First, the characteristics
Command history,!! ,!$,! character,!n (n is the first few commands)
tab can complete file path or command
Alias a= "B", unalias A, how to see which alias is defined, just hit alias
input and output redirection; >>, <,2>,2>>
Pipe Symbols |
Job Control CTRL + Z, CTRL + C, FG, BG
"Weak parsing, ' strong parsing, ' equivalent to returning ' The result of the command,
* Wildcard,? Wildcard, #注释, $ reference variable, multiple commands are written on one line, & run in the background, && logic and
Second, the variable
Env Current user all environment variables
Set user-owned variables + their own defined variables, unste
Export declared as global variable
echo Display Variable
Third, bash shell configuration file
1. System Setting value
/etc/profile
/etc/bashrc
2. Personal Setting value
~/.BASHRC, open a shell when executing
~/.bash_profile, when the user logs on to execute
~/.bash_history
~/.bash_logout
For the execution order, if the user logs on, the RC is executed before the profile is executed.
Then → figure this out. = = Source, which is the immediate new configuration
Three, Pipeline command
1.cut-d "Split symbol" [-CF] Fields
-D followed by delimiters, default to spaces
-C is followed by the first few characters
The number of blocks is followed by-F.
Eg:cut-d ":"-F 1/ETC/PASSWD
2.sort [-t delimiter] [-NRU]
-N using pure numeric sorting
-R Reverse Sort
-U the same line that appears is listed only once
2.1 Uniq [-c]
Show only one
-C in digital arrangement
3.WC [-LMW] [filename]
-L How many lines
-m number of characters
-W How many words
4.tee
Equivalent to being redirected and displaying content on the screen
5.tr replacement
Eg:ls-al |tr ' A-Z ' A-z change all lowercase to uppercase
6.split [-BL] Split
-B Split according to file size
-L Divide line according to number of lines
Eg:split-l 100/etc/passwd Thenameyouwant
Split-b 1m/etc/passwd Thenameyouwant
Written in the back//////////////////////////////////////////////////////////
I dragged it even more! Drag the more!! Drag the more!!!
It turns out I'm really a bit of a procrastination!!!!
Some feel that their study efficiency is a little low AH recently!!!!!
"CentOS" Learning Bash