[Next] [Previous] [Up] [Top] [Contents]

CHAPTER 6 Special Unix Features

6.4 Wild Cards


The shell and some text processing programs will allow meta-characters, or wild cards, and replace them with pattern matches. For filenames these meta-characters and their uses are:

? match any single character at the indicated position

* match any string of zero or more characters

[abc...] match any of the enclosed characters

[a-e] match any characters in the range a,b,c,d,e

[!def] match any characters not one of the enclosed characters, sh only

{abc,bcd,cde} match any set of characters separated by comma (,) (no spaces), csh only

~ home directory of the current user, csh only

~user home directory of the specified user, csh only


Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]