I want to select some columns in a file and run some command on it.
so my script is this
awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$19}' test.txt > outpot.txt
but this print it to another file and I tried to do this
awk '{print $1,$2,$3,$4,$5,$6,$7,$9,$10,$11,$12,$13,$14,$15,$16}' test.txt | next commands
(This commands works fine! I did a mistake and I don’t know how to remove this question)
is it possible to make this command shorter like instead of writing all columns just write $1-7 && $9-15 && $19 (but this is not really important I just wondered if it’s possible). The main thing is to be able to choose that columns
Updated based on glennjackman’s suggestion: