/bin/bash is the default shell for Linux
setting, reading, and deleting variables
Example: Name=zhangsan echo $name unset name
You can view the value of the Echo $HOME $PATH of the environment variable
Variable setting, there can be no spaces on both sides of the equal sign
Variable names can only be alphanumeric, but the start character cannot be a number
Variable contents can be enclosed in single or double quotation marks if there is a space character.
The $ symbol within the double quotation marks retains the original attribute, and the $ symbol within the single quotation mark is just a general character
Example: Name= "I am $USER" echo $name---i am root
Back quote echo ' Date ' or echo $ (date)
Extension variable contents can use "$ variable name " to accumulate content path= "$PATH":/home/zhangsan
You can use export to turn user variables into environment variables export name
env command to view all environment variables and values in the current shell environment
The SET command can view all custom variables and environment variables
The subroutine inherits only the environment variables of the parent program and does not inherit the parent program's custom variables
Read-p followed by the prompt character-T followed by the number of seconds to wait for the variable name
Read name what you enter from the keyboard is the value of the name variable
Read-p "What is your name?"-T 5 name prompts the user to enter their own name as the value of the name variable within 5 seconds
Learn the shell happily