Print array into a single file - AWK

view full story

http://www.unix.com – Hi all, I been looking for a solution to the fact that when I use: Code: for (i=1; i<=NF; i++) print $i fields that are originally in a single line are printed in a single line I have severals files for which the first 7 are the same, but the number of variables after that can vary, for example NF is 16, 46, 109, etc... I want to change the codes AAA, BBB and CCC for numbers, for ex, 10,20,30 And I want to do it for a list of files. Here is an example of my input file: Code: SAMP1,189,198,473909,7479044,1517,AAA,8.2,27.7,18.0 SAMP2,231,240,473917,7478991,1487,AAA,12.7,50.2 (HowTos)