大家来帮我看看这段脚本有什么问题
file=info.txt
flag=ibm
for item in `cat lcaix43_info.txt`
do
awk '{if ($1==$item && $3~/$flag/) (print $1\tT\t$3); else (print $0);}' MBfiles
done
报了不少如下 错误:
awk: syntax error near line 1
awk: illegal statement near line 1
------解决方案--------------------
发现一个, print不能用\t, printf可以用\t