Linux cheatsheet

霍财
2023-12-01

 

1. Save output of command as a file, append date

/app/etl/DEV/appl/log2/xxx_$(date +"%Y%m%d").log

 

2. parameters

Env 

 

3.output parameters

echo $<para>

 

4.awk

输出以逗号分隔的第一列的值,前五行

last -5 | -f ','  '{print $1}'

 

5.sed

用TEST替换test

sed 's/test/TEST' file

 

 

6. 7z

 

"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\Users\fuxt2\Documents\002 reference\templates\IDL 2 UDL\sample_table.zip" "C:\Users\fuxt2\Documents\002 reference\templates\IDL 2 UDL\sample_table.txt"

 

7. grep 正则搜索

转载于:https://www.cnblogs.com/fuxiaotong/p/6794778.html

 类似资料:

相关阅读

相关文章

相关问答