awk妙用(如何取出某行某列的某个元素)

[root@localhost ~]# cat a.txt
a b c
d e f
g h i
[root@localhost ~]# cat a.txt | awk 'NR==2 {print $3}'
f
取出第二行第三列的元素

你可能感兴趣的:(linux,编程)