Awk
The operation of a program is a variable of some column state, which is represented by the change of variable value.
Start with a letter or underscore, and the rest can be: letters, numbers, underscores.
It is advisable to follow the following specifications:
1. Start with a letter
2. Connect the words with an underscore or an underscore
3. Differentiation of the same type with numbers
4. The best name for the file plus extension
Set and env differences
Set: Show All variables
ENV: Environment variables
Assigning values to variables
Varname=value
Echo $VARNAME
Delete variable unset VARNAME
Common system Variables
PATH
Pwd
Lang
HOME
Histsize
PS1
Ifs
The field separator is a space, wrapping, TAB key collection
Mathematical operators
+ addition operation
-Subtraction operation
* Multiplication operation
/Division Operation
% modulo operation
logical operators
< less than
> Greater than
<= less than or equal to
>= greater than or equal to
= = equals
! = does not equal
&& and
|| Or
Assignment operators
= Direct Assignment
+ = First reference and re-assignment
*= first Reference and then assign value
/= first Reference and then assign value
%= first Reference and then assign value
If syntax
if[ -D $var] Then Echo "$var is directory"elif[ -b $var] Then Echo "$var is block"elif[ -F $var] Then Echo "$var is regular file"Else Echo 'Unknow'fi
Linux base-awk, variables, operators, if