hi i am trying to save values in a file in an array in awk..the file is as follows:
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,
so far i have this:
awk 'BEGIN {RS="\n";FS=","}
{
for(i=1;i<=NR;i++)
{
for(j=1;j<=NF;j++)
{
a[i,j]=$j;
}
}
}
END {
for(i=1;i<=NR;i++)
{
for(j=1;j<=NF;j++)
{
printf("%c\n",a[i,j]);
}
}
}' try > try1
however, i am not getting anything in the try1 file. what am i doing wrong? thanks