向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

posted @ 2012-09-21 07:52  浪里飞  阅读(940)  评论(0编辑  收藏  举报