5

利用for + grep awk 解决grep + xargs

 3 years ago
source link: https://blogread.cn/it/article/526?f=hot1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
您现在的位置首页 --> Linux --> 利用for + grep awk 解决grep + xargs

利用for + grep awk 解决grep + xargs

浏览:2245次  出处信息

cat aaa | xargs grep **

想实现类似这样的东东,但似乎xargs 和grep搭配似乎不支持,于是采用了如下策略。

for i in `awk ‘{print $1}’ bad.result.txt`; do if [ `grep $i uid_result` ]; then echo $i; fi; done

觉得文章有用?立即:

和朋友一起 共学习 共进步!

建议继续学习:

QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK