I. Special symbols in the shell
Number: wildcard character, can match 0 or any number of characters
? Number: Tan,
#号: An annotation character that is followed by a command or parameter that does not execute
\ No.: Raise the meaning of the instruction before the special symbol
| Pipe break: Pass the result of one command to another command, note that the latter command is not a command, usually a command for a document. such as less, more, head, tail, grep, sed, awk, and so on.
$: variable prefix,! ¥
; Multiple commands are written to one line;
~ User home directory substitute, root home directory, regular indicates match
& at the end of the command to put the command in the background
Output both correct and incorrect results to a file
Used in the shell to represent or
Indicates if command 1 fails to execute command 2, if command 1 succeeds then command 2 is not executed, and only one command between commands 1 and 2 executes
&& indicates that if command 1 fails, the command terminates, all commands are not executed, command 2 executes if command 1 succeeds, command 1, 2 either executes, or none executes.
Example
1, II and && examples of special symbolic meanings
In this example, the Touch test2 command is executed only if LS test2 is successful. Because the test2 does not exist, the previous command is unsuccessful, and a subsequent command will not execute
Then we change to ls test2 | | Touch Test2 See
In this case, because the previous command LS Test2 failed, the 2nd command was executed.
Ii. commands related to pipe breaks
1. Cut command
Separator
2. Sort command
3, WC command,
4. Uniq command
5. Tee command
6. TR command
7. Split command
Linux System Shell Basics (iii)