The UNIX shell must usually expand wildcard filenames for user or shell script commands. Under UNIX, this wildcard expansion is always performed before the command is executed. This simplifies the command, because it sees only the finalized arguments. It also helps to make all commands work consistently, because wildcard expansion is performed in one place only—the shell process.
However, the UNIX environment is a rich environment. If you don't like one shell, you usually can choose from other shell programs. Going a step further, you might choose to write your own. To assist in making these different shell programs behave in the same way for wildcard filenames, two groups of function calls are provided:
Functions that match string patterns
Functions that search directories with pattern matching applied
The function fnmatch(3) is provided under UNIX for matching strings in a shell-like manner.
18.220.237.24