📜  awk 列 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:04.085000             🧑  作者: Mango

代码示例1
File: 
0.9848077530  -0.1736481777 0.9396926208  
0.9848077530  -0.1736481777 0.9396926208  
0.9848077530  -0.1736481777 0.9396926208 

cat file | awk '{print $1}' 
cat file | awk '{print $2 $3}'
cat file | awk '{print $NF}' # last colomn
cat file | awk '{print $(NF-2)}'  # two column before the last