Re: Trim file with sed
From: alexs (spam_at_alexs.org)
Date: 10/29/05
- Next message: Jordan Abel: "Re: Problem in Child process"
- Previous message: seema_coma_at_yahoo.co.in: "Re: Problem in Child process"
- In reply to: Kelvin Moss: "Trim file with sed"
- Next in thread: Chris F.A. Johnson: "Re: Trim file with sed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Oct 2005 04:03:57 -0700
Kelvin Moss wrote:
> Hi all,
>
>
> I have a file format where two parts are delimited by a newline (\n)
> character. I need to get the file after the \n character. I tried this
> but it gets me the \n character too in o/p.
>
>
> E.g. if file is
> a
> b
> c
>
>
> d
> e
>
>
> then I want
> d
> e
> as o/p.
>
>
> I tried this sed expression -- sed -n '/^$/,$p' <file> but it doesn't
> do the desired effect. Can anyone help me here?
>
>
> Thanks.
You could do it with grep.
Something like
cat FILE | grep "" -x -A 10000
(or bigger number for -A if the file is really big!)
- Next message: Jordan Abel: "Re: Problem in Child process"
- Previous message: seema_coma_at_yahoo.co.in: "Re: Problem in Child process"
- In reply to: Kelvin Moss: "Trim file with sed"
- Next in thread: Chris F.A. Johnson: "Re: Trim file with sed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|