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
9,034 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

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
2,495 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 20, 2020 in Linux Administration by MD
• 95,460 points
1,076 views
0 votes
0 answers

How can I convert a series of images to a PDF from the command line on linux?

I have a scanning server I wrote ...READ MORE

Apr 21, 2022 in Linux Administration by Edureka
• 13,690 points
579 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,490 points
2,684 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
1,180 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,490 points
4,018 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP