1. Wildcard characters
? : Matches an arbitrary character
*: matches 0 or any number of characters, that is, can match any content
[]: Matches any one of the characters in brackets
[-]: matches any one of the characters in brackets,-represents a range
[^]: Indicates that a match is not a character within the brackets
Other special symbols in 2.bash
': Single quotation mark. All special characters in single quotes, such as "$" and "'" have no special meaning
"": double quotation marks. Special symbols have no special meaning in double quotes, but "$", "" "and" \ "are exceptions, with special meanings for" Call variable Value "," Reference command ", and" escape character "
": Anti-quotes. The contents of the inverted quotation mark are system commands, which are executed in bash. and $ (), it is recommended to use $ ().
$ (): used to refer to system commands
#: In the shell script, #开头代表注释
$: The value used to invoke the variable
\: Escape character. The special symbol that follows \ will lose its special meaning and become a normal character.
linux-wildcard characters