Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unix cut, remove first token

Tags:

unix

cut

I'm trying to use Unix cut to remove the first two fields per line. I have input lines of of the form

(token)(whitespace)(token)(lots of text)

The problem is that there exit n tokens per line, so I can't do something like this

cut -f3,4,5,6,7,8,9

Is there a way to tell cut to take everything except the specified fields?

like image 759
Mike Avatar asked Mar 11 '10 20:03

Mike


2 Answers

cut -d' ' -f3-

-d' ' might be required.

like image 125
ring bearer Avatar answered Oct 22 '22 23:10

ring bearer


cut -f3-

[Body is too short? Is that new?]

like image 44
Thomas Avatar answered Oct 23 '22 00:10

Thomas