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 in Linux Administration by Upasana
• 8,530 points
48 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 by Shubham
• 13,300 points

Related Questions In Linux Administration

0 votes
1 answer

How to display a simple list of all disks, like this /dev/sda /dev/sdb ?

You can list all the disk in ...READ MORE

answered Jul 12, 2018 in Linux Administration by DearestOne
• 200 points
107 views
0 votes
1 answer

How to take input from user in bash script?

You can use if-else branch to check ...READ MORE

answered Jan 31 in Linux Administration by Omkar
• 67,600 points
38 views
0 votes
1 answer

how to loop through the content of a file using bash

One of the ways to do it ...READ MORE

answered Feb 15 in Linux Administration by ajs3033
• 7,280 points
82 views
0 votes
1 answer
0 votes
1 answer

Using shell variables in an awk script

Using -v is, imo, The best way because ...READ MORE

answered Jul 1 in Linux Administration by Shubham
• 13,300 points
55 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
89 views
0 votes
1 answer

to pass the user's password to scp

Try using the 'expect' script on the ...READ MORE

answered May 29 in Linux Administration by Shubham
• 13,300 points
33 views
0 votes
1 answer