Angus Lees <[EMAIL PROTECTED]> wrote:

> sed is no good for multiple line work. you can do it, but its just silly:

> uniq | sed -ne 
>'s/^\([^,]*,\)\{2\}\([^,]*\)$/\2/;h;n;s/^\([^,]*,\)\{7\}\([^,]*,[^,]*\),.*$/,\2/;H;x;s/\\
> //p'

Try

uniq | paste -d , - - | cut -d , -f x,y

The values of x and y is left as an exercise to the reader.
-- 
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to