While most users learn shell pattern matching behavior early in their exposure to UNIX, it is useful to review it here before introducing the functions that implement it.
A shell pattern can consist of normal characters and meta-characters. Normal characters represent themselves, and meta-characters have a special meaning for pattern matching. The set of meta-characters for shell patterns is relatively small. They are
|[ and ]||Square brackets|
|!||Bang (in )|
|-||Hypen (in )|
Each meta-character is described in the subsections that follow.
The * character can match zero or more characters. The following shell experiment on a FreeBSD system illustrates this meta-character ...