Pstree-p #显示进程编号 (tree) echo $$ basic structure of #显示当前shell进程编号 scripts: #! Shebang (indicates what shell is used to open a file, typically using bash) configuration_variables #定义变量FUNCTION_DEFINITIONS # define function Main_code #主要执行命令 Syntax error in detection script bash-n/path/to/some_script Debug execution bash-x/path/to/some_script variable naming law: 1, cannot make a reserved word in a program: for example if, for  2, can only use numbers, letters and underscores, and can not start with a number 3, see the name of the 4, uniform naming rules: Hump nomenclature (hostname or hostname) variables= ' command ' # Assign the command execution result to the variable, you need to use the reverse single quotation mark "or $ () export variable name =" Define variable "# variable name plus export, the variable is defined as an environment variable, can be passed to the sub-process location variable: $ $ $ $ $ $ $ $*, [email Protected], $# (show parameters a few) set #显示已定义的所有变量unset name #删除变量 TEST command: Use [[ when there are regular expressions in the statement], generally with text or [ ] Test expression [ EXPRESSION] [[EXPRESSION]]read-p] Enter a content: "Variablesname#将输入的内容付给一个或多个变量
The second week of Linux learning; shell programming