Re: Using awk or cut to print every field after the 11th field

From: Stephane CHAZELAS (stephane_chazelas_at_yahoo.fr)
Date: 06/06/03


Date: 06 Jun 2003 08:51:10 GMT

Paul Porcelli wrote:
> can anyone think of a neat way to print field 11 onwards
> from various line with the following shape.
> N.B. The number of fields can vary, but I always want to
> print from field 11 until the last field inclusive.
>
> user1 29299 0.0 0.2 1024 776 ? S 08:10:00 0:00 sh -c /home/user/testscr

Hard to do with awk if you want to preserve spacing in the
command line.

With some seds, you can do:

sed 's/\([^[:blank:]]*[[:blank:]]*\)\{10\}//'

-- 
Stéphane


Relevant Pages