First, special symbols
' * ' wildcard character, any of any characters
'? ' any one character
' # ' comment characters
' \ ' de-semantic characters
' | ' piping
The prefix of the ' $ ' variable
'!$ ' combination, regular inside means end
'; ' multiple commands written to one, separated by semicolons
'? ' User's home directory, followed by a regular expression representing a match
' & ' puts the command behind the command and throws it backstage.
' > ' correct redirection
' >> ' append redirect
' 2> ' ERROR redirection
' 2>> ' ERROR chasing redirect
' &> ' redirects the error with the correct redirect in the same file
' [] ' one of the specified characters, [0-9] [A-z]
' | | ' In the shell is the meaning. If the first command executes successfully, the subsequent command will not execute
' && ' If the previous command executes successfully, the following command will be executed
Ii. several commands related to pipe breaks
CutCommand: Intercepts a string,
Example: cat/etc/passwd |head-2 |cut-d ":"-f (1-10)
-d Specifies the delimiter:
-F Paragraph
-c Specifies the number of character examples: cat/etc/passwd |head-2 |cat-c 4
SortCommands: Sorting
Example: SORT-NR filename
-N is numerically arranged, and the letter is considered to be 0.
-R Reverse Order
-T delimiter
WC-l Command: Count rows
Wc-m Command: Count characters
WC-W Statistical terms
(cat-a filename can see all characters that contain hidden text)
UniqTo repeat the command:
(Sort command with uniq command to use, only convenient)
-C Count Repeats
TeeRedirection is also displayed on the screen
Similar to >,
Example: Sort 1.txt |uniq-c |tee a.txt
TRReplace character
Tr ' a ' B ', Case replacement: TR ' [A-z] ' [A-z] '
Example: Converting a string to uppercase
echo "Haohaoxuexi" |tr ' [ha] ' [ha] '
SplitCutting
-B Size (default unit), example: split-b 100M filename Custom prefix name
-L number of rows: split-l
24th Lesson Shell's special symbols and Cut_sort_wc_uniq_tee_tr_split commands