7
votes

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?

3

3 Answers

11
votes
cut -d' ' -f3-

-d' ' might be required.

1
votes
cut -f3-

[Body is too short? Is that new?]

-2
votes

You can also use AWK for this:

   awk '{$1=$2=""}1' file