我该怎么做:
awk < file '{ print $2 }'
“{ print $2 }”在名为 awk-script 的文件中的哪个位置?
我最好的猜测是
awk < file `command awk-script`
或
awk < file `cat awk-script`
但没有成功。
最佳答案
你需要做的
awk -f awk-script < file
awk-script
包含
[tthangavel@ltest ~/test]$ cat awk-script
{ print $2}
关于linux - awk 使用外部脚本和 <,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32941906/