Linux之awk命令查找文件中某列的值,符合内容进行筛选。

执行ps -eLf  > /root/ps.log ,查找文件中,父进程等于1的内容


cat /root/ps.log | awk '($3=="1"){ print}' 


 cat /root/ps.log | awk '{if ($3=="1") print}' 




猜你喜欢

转载自blog.csdn.net/qq_24644517/article/details/80880792