uniid=`awk 'BEGIN{print substr($c_acc_id,17,9)}'`
clr_inst_id=`awk 'BEGIN{print substr($c_acc_id,1,9)}'`
这两句怎么总是报awk: Field is not correct.
The source line number is 1.
------解决方案--------------------------------------------------------
uniid=`awk -va=$c_acc_id 'BEGIN{print substr(a,17,9)}'`
这样呢?
------解决方案--------------------------------------------------------
c_acc_id是什么?如果是SHELL变量的话可以用两层引号引用
awk 'BEGIN{print substr("'$c_acc_id'",1,9)}'
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------