awk to print all columns from the nth to the last

0 votes

This line had worked until I had whitespace in the second field.

svn status | grep '\!' | gawk '{print $2;}' > removedProjs

Jul 19, 2019 in Linux Administration by Upasana
• 8,620 points
10,865 views

1 answer to this question.

0 votes

the following will print all but the very first column

awk '{$1=""; print $0}' somefile

the following will print all but the two first columns

awk '{$1=$2=""; print $0}' somefile
answered Jul 19, 2019 by Shubham
• 13,490 points