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
911 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,480 points

Related Questions In Linux Administration

0 votes
1 answer

What is the linux command to find Memory and CPU usage in percent for last 30 days?

Try the following: Cat proc/meminfo top top -i less /proc/memin ...READ MORE

answered Oct 14, 2020 in Linux Administration by Kim
117 views
0 votes
1 answer

How to find the first field from a file in Bash Shell?

Hi@akhtar, You can extract text from a file. ...READ MORE

answered Oct 19, 2020 in Linux Administration by MD
• 95,140 points
112 views
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
2,393 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, 2019 in Linux Administration by Shubham
• 13,480 points
894 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
292 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, 2019 in Linux Administration by Shubham
• 13,480 points
2,719 views
0 votes
1 answer