Hi all!
I would like to know how to print
$0
when using multidimensional array like below
time being I am using for loop to print columns like this
awk 'FNR==1{i++}
{for(k=1;k<=NF;k++)A[i,FNR,k]=$k}
END{for(j=1;j<=25;j++)
print A[2,1,1],A[2,1,2],A[2,j,3],A[2,j,4],A[2,j,1],A[2,j,2],A[2,j,3],A[2,j,4],A[1,j,1],A[1,j,1],A[1,j,2],A[1,j,3],A[1,j,4],A[1,j,1]}' file1 file2
so here my problem is I have more than 15 column that means whether I have to type like below till 15th column
A[2,j,1],A[2,j,2],.....A[2,j,15]
or any other solution is available ?
thanks in advance