首页 > 代码库 > get mac 20150202

get mac 20150202


#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

 

get mac 20150202