向awk中传递数组

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

转载于:https://www.cnblogs.com/mydomain/archive/2012/09/21/2696279.html

你可能感兴趣的:(awk)