Filename Substitution (Globbing)
The most common type of substitution is filename substitution or globbing. Globbing is the method by which the shell expands a string containing globbing meta-characters or wildcards into a list of filenames. Table 9.1 lists the wildcards used in globbing.
|*||Matches zero or more occurrences of any character|
|?||Matches one occurrence of any character|
|[characters]||Matches one occurrence of any of the given characters|
Any command or script that operates on files can take advantage of globbing. The examples in this section use the ls command because its output clearly illustrates the results of globbing.
The * Meta-Character
The simplest form of filename ...