#cat xxx | awk ‘{if(system("grep -qiw ‘huawei‘")) {print "huawei"$0;}else {print $0;}}‘ >yy.csv
#cat xxx | awk ‘{for (i=0;i<30;i++){if($0~/Huawei/) {print array[i],$0;}else {print $0;}}}‘ >yy.csv
#cat xxx |if grep -q -i -w huawei; then echo huawei;else echo 000;fi
#cat xxx | awk ‘/Huawei/{print "Huawei"$0}‘ > yy.csv
cat xxx | awk ‘/Apple/{print "Apple"$0}‘> yy.csv
sz yy.csv
时间: 2024-09-30 11:23:39