我需要过滤列表文件(top 命令的输出)以获取一些信息:
似乎我无法使用 grep 和 awk 绑定查找:
我的第一次尝试:
find . -name "high-cpu.out" -exec grep "jboss" | awk '{ print $5 }' {} \;
find: missing argument to `-exec'
awk: fatal: cannot open file `{}' for reading (No such file or directory)
Run Code Online (Sandbox Code Playgroud)
第二次尝试:
find . -name "high-cpu.out" -exec grep "jboss" {} \ | awk '{ print $5 }';
find: missing argument to `-exec'
Run Code Online (Sandbox Code Playgroud)
有什么帮助吗?谢谢