Using AWK, while I am reading the file, I am separating fields based on the ':' & using NF. I also would like to mention line numbers from the file they are originally from.
How would I take out the line number for them?
I am trying something like following ,
awk -F":" '{
j=1
for (i=1; i<= NF; i++)
{
printf("\t%s\t%s\t%s\n",$j,$i,$(i+1))
}
j=j+1
}' filename
Can anyone please rectify?