Summary: The regular expressions for the two commands are distinguished by ' single quotation marks.
The output variable name is quoted in single quotes, and the output variable value is quoted in double quotes, which is generally common in bash scripts.
To use a variable value in a bash script, enclose the double quotation mark
awk usage:
Reference URL: http://www.cnblogs.com/xudong-bupt/p/3721210.html
Command form:
awk [-f|-f|-v] ' begin{}//{command1; Command2} end{} ' file
Separate the Product_uuid line with "=" to display the second parameter content
Awk-f "=" '/product_uuid/{print $ '/etc/save_env
SED usage:
Reference URL: http://www.cnblogs.com/dong008259/archive/2011/12/07/2279897.html
sed [-nefri] ' command ' file
Note: If you want to replace the source file content directly without the screen output, add the option-I, which is sed-i
Example: Delete the line contents of Ipguard beginning in the file installed.db
Sed-i '/ipguard/d ' setup/installed.db
The awk, sed command for Linux