Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: I want to list the NEXT line after a string appears in a list of files
- X-seq: zsh-users 10653
- From: John Eikenberry <jae@xxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: I want to list the NEXT line after a string appears in a list of files
- Date: Fri, 1 Sep 2006 11:15:07 -0400
- In-reply-to: <Xns9831A29573C98zzappergmailcom@xxxxxxxxxxx>
- Mail-followup-to: John Eikenberry <jae@xxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns9831A29573C98zzappergmailcom@xxxxxxxxxxx>
zzapper wrote:
> Hi
> I want to list the NEXT line after a string appears in a list of files
>
> eg
> > egrep "Anecdote" m??.txt (But display next line)
>
> I guess Sed/Awk would do this, I would probably use Perl.
>
> Suggestions pls
>
Note zsh specific, but this should work.
egrep -A1 "Anecdote" m??.txt | tail -1
--
John Eikenberry
[jae@xxxxxxxx - http://zhar.net]
______________________________________________________________
"It is difficult to produce a television documentary that is both incisive
and probing when every twelve minutes one is interrupted by twelve dancing
rabbits singing about toilet paper." - Rod Serling
Messages sorted by:
Reverse Date,
Date,
Thread,
Author