50 likes | 158 Views
Lab 4 Filename Generation. ICS 431 – Operating System. File Name Generating Characters. ? Matches any single character except a leading dot [ ] Defines a class of characters - Defines an inclusive range ! Negates the defined class
E N D
Lab 4Filename Generation ICS 431 – Operating System
File Name Generating Characters ? Matches any single character except a leading dot [ ] Defines a class of characters - Defines an inclusive range ! Negates the defined class * Matches zero or more characters except a leading dot
File Name Generation -- ? ? Matches any single character. $ ls –a . .. .zzrstrsturstuvrstzbbabbcyzzzayy 7A 9B 7a 12D Example $ echo ??? $ echo rst?
File Name Generation – [ ] [ ] Defines a class of characters from which one will be matched. $ ls –a . .. .zz 8B 11C 4D 6B Ant Cat Dog rstrstuvbacyz Example $ echo [abc]?? $ echo [1-9] [A-Z] $ echo [!A-Z]??
File Name Generation -- * • Matches zero or more characters except a leading dot (.). $ ls –a . .. .profile ab.dat abcd.dat abcdeabcde.data Example $ echo * $ echo .* $ echo .*dat $ echo *e