I have the following command.
(head -1 invoice.txt && sed '1d' invoice.txt |sort -rn -k4,4) |column -ts $'\t' |less -S
head -1prints the first line.
sed "1d'removes the first line so soft wont be confused
sort -rn -k4,4sorts my file by the 4th column only
column -ts $'\t'splits the file by tab
less -Sprints it on the terminal
I would like to print only the first, fourth and last column. This is a small file however I have one with fourteen and one with twenty one columns, that i will use this template on.
And I am not sure if to use