I am trying to reformat a large file. The first 6 columns of each line are OK but the rest of the columns in the line need to be combined in increments of 2 with a "/" character in between.
Example file (showing only a few columns but have many more in actual file):
1 1 0 0 1 2 A T A C
Into:
1 1 0 0 1 2 A/T A/C
So far I have been trying awk and this is where I am at...
awk '{print $1,$2,$3,$4,$5; for(i=7; i < NF; i=i+2) print $i+"/"+$i+1}' myfile.txt > mynewfile.txt