Using awk to print all columns from the nth to the last
awk, cygwin, linux, shell
Solution
Print all columns:
awk '{print $0}' somefile
Print all but the first column:
awk '{$1=""; print $0}' somefile
Print all but the first two columns:
awk '{$1=$2=""; print $0}' somefile
Problem
This line worked until I had whitespace in the second field: ``` svn status | grep '\!' | gawk '{print $2;}' > removedProjs ``` Is there a way to have `awk` print everything in `$2` or greater? (`$3`, `$4`.. until we don't have any more columns?) I'm doing this in a Windows environment with Cygwin.
Related problems
- How to specify more spaces for the delimiter using cut?
- How to print third column to last column?
- Print rest of the fields in awk
- How to print all the columns after a particular number using awk?
- Bash tool to get nth line from a file
- How to make the 'cut' command treat same sequental delimiters as one?
- tail -f into grep into cut not working properly
- awk + Need to print everything (all rest fields) except $1 and $2