/* Configure /*-------------------------------------------------------------------------------------------
@ Blackeye poet <www. chenwei. ws>
Optional --------------------------------------------------------------------------------------------*/
I. wildcard characters:
? MatchOneAny character.
* Match 0OneOrMultipleAny character.
[] Matching arbitrary in bracketsOneCharacter.
[-] Match anyOneCharacter,-indicates the range.
[^] Non-logical, matching is not in bracketsOneCharacter
The wildcard isUsed to match file namesOf:
Mkdir TMP;
Touch ABC;
Touch 0abc;
Touch ABCD;
Touch AABC;
Ls * ABC; # Matches ABC, 0abc, and AABC.
Ls * ABC *; # matching ABCD
Ls? ABC; # match 0ab, AABC
Ls [0-9] ABC; # match 0abc
Ls [^ 0-9] ABC; # match AABC
Ii. special symbols:
Single quotes (''): All special symbols in single quotes have no special meaning.
Double quotation marks (""): special characters in double quotation marks do not have special meanings. However"$", "'" And "\" have special meanings of "Call variable value", "reference command", and "Escape Character".
Backticks (''): The content enclosed by backticks isSystem commandsIn bash, It will be executed first. Like $ (), $ () is recommended, because it is very easy to read the quotation marks.
$ (): Used to reference system commands like anti-quotes.
#: In a shell script, the line starting with # represents a comment.
$: Value used to call a variableTo call the value of the variable name, you must use $ name to obtain the value of the variable.
\: Escape character. The special symbol following \ will lose its special meaning and become a common character. For example, \ $ outputs the "$" symbol, which is not a variable reference.
Name = www. chenwei. ws
Echo $ name # www. chenwei. ws
Echo '$ name' # $ name
Echo "$ name" # www. chenwei. ws
AB = 'date'
Echo $ AB # August 18, 2014 21:25:52 CST
Echo $ (date) # Monday, January 1, August 18, 2014 21:25:52 CST