awk for循环
作者:互联网
awk for循环及 uniq 去重,获取数字值;
for item in `grep errors test.txt | awk '{print $1}' |uniq | awk -F "==" '{print $1}' ` do echo "test:$item" done #test.txt ==44444== 2 errors occurred ==11111== 1 errors occurred ==234567== 1 errors occurred ==44444== 1 errors occurred
标签:44444,errors,occurred,item,循环,awk,test 来源: https://www.cnblogs.com/xinhua219/p/16581238.html