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
- Next message: Chris F.A. Johnson: "Re: keyboard command"
- Previous message: Stephane CHAZELAS: "Re: grep <LF><LF> delimited lines in text file?"
- In reply to: Paul Porcelli: "Using awk or cut to print every field after the 11th field"
- Next in thread: Chris F.A. Johnson: "Re: Using awk or cut to print every field after the 11th field"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Chris F.A. Johnson: "Re: keyboard command"
- Previous message: Stephane CHAZELAS: "Re: grep <LF><LF> delimited lines in text file?"
- In reply to: Paul Porcelli: "Using awk or cut to print every field after the 11th field"
- Next in thread: Chris F.A. Johnson: "Re: Using awk or cut to print every field after the 11th field"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|