向awk中传递数组
a1=(1,2,3)
a=("aa","bb","cc")
awk '{split(b,c,","); split(b1,c1,",");for(i in c1) {d[i]=c[i];print i,d[i]}}' b=${a[@]} b1=${a1[@]} file1.dat
原文
http://bbs.chinaunix.net/thread-888053-1-1.html