Special characters in shell pattern matching
* |
Matches any string (including an empty string). |
? |
matches any single character . |
[...] |
Matches any character that is contained. |
Precautions:
' * ' uses ' * * ' in the file name extension to match all files and 0 or more subdirectories. If you add '/' to the end of the pattern, only the matching directory and subdirectories do not match the file.
[...] If a pair of characters is separated by a hyphen (-) then a range is represented. If the first character in [] is '! ' or ' ^ ' then the [] pattern will become mismatched any characters contained.
For example: [A-dx-z] is equivalent to [ABCDXYZ]
Extglob Options Open
The following pattern matching is supported if the EXTGLOB option ( Shell built-in command shopt extglob option ) is turned on in the shell.
Multiple parameters can use the ' | ' To split.
Shell Pattern Matching