gpt4 book ai didi

linux - awk 使用外部脚本和 <

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:08:36 25 4
gpt4 key购买 nike

我该怎么做:

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com