[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: egrep: question
From: |
Eli Zaretskii |
Subject: |
Re: egrep: question |
Date: |
11 Dec 2003 08:07:30 +0200 |
> Date: Wed, 10 Dec 2003 22:21:41 -0700
> From: address@hidden (Bob Proulx)
>
> Jeremy C. Reed wrote:
> > roni wrote:
> > > i'd like to search a file, and every time i bump into the word
> > > "start", i'd like to print out all lines until i bump into the word
> > > "stop".
> > > and then proceed.. - to print out all the paragraphs in that file that
> > > start with "start" and end with "stop".
> >
> > Try sed.
> > Have a look in the "sedfaq". It has examples.
>
> Of course I am sure you can do it in sed. But the way to have the
> process repeat for multiple sets of start and stop blocks escapes me
> at this moment.
It's very easy:
sed -n -e /start/,/stop/p