Shell's Features
~/.bash_history command history to store files, log out after saving.
$HISTSIZE the number of command history bars, which allows the ~/.bash_history file to store the number of command bars, by default.
!! : Previous command
!$: Last parameter of previous command
Command label: Executes the corresponding command in the history output
*: wildcard characters, any of any characters; ?: Wildcard, an arbitrary character
The alias defined in the current shell is only valid at the current shell
> Output redirect >> Chase Redirect < input redirect 2> error redirect 2>> error append redirect
Input redirection is the contents of the file after using the symbol as input
Error redirection logs only error messages
Shell Variables
Variables are divided into system preset variables and user-defined variables
Variable rule:
Variable name = variable content
No spaces on either side of the = sign
Variable names can only consist of letters, numbers, underscores, and cannot start with a number
Use single quotation marks when the contents of a variable contain special characters
When you need to reference the run result of a command in the variable content , you should use the inverted single quote '
Use double quotation marks when you need to reference other variable values in the contents of a variable
Use double quotation marks when the contents of a variable contain single quotes
Summary: Single quotes will use special characters as ordinary characters, and double quotes will not eliminate the meaning of special characters. (except for the last article above)
ENV: Display System-Preset environment variables
Set: Show all variables, System presets and user-defined
Export: Declaring variables in a child shell
unset variable name: Cancel declaration variable
Special symbols in the shell
#: Comment, ignore the following \: De-ideographic character, eliminate the role of special characters, make it a normal character
~: User's home directory &: Put the command in the background run []: character combination, match any one of the characters in parentheses
This article from "Good Freshman only gourd" blog, please be sure to keep this source http://zhuxingye.blog.51cto.com/11121336/1737906
Shell's Features