Here's a way to have awk print all fields (separated by spaces) from each line, except for fields number 1 and 9 (starting with a count of 1):% awk '{ for (f=1; f <= NF; f++) { if (f != 1 && f != 9) printf("%s ", $f);} printf(" ");}' < ook.txtOr you can put this at the end of a pipeline instead of directing a text file into the command. (courtesy of DougEDoug)