我有一个 C 程序,我想通过在 shell 脚本中使用 awk 来调用它。我怎么能做这样的事情?
请您参考如下方法:
从 AWK 手册页:
system(cmd) executes cmd and returns its exit status
The GNU AWK manual also has a section that, in part, describes the system
function and provides an example:
system("date | mail -s 'awk run done' root")