in reply to Re: Finding part of a file
in thread Finding part of a file

Are we allowed to assume a unix box?

awk -e '/banana/,/grape/' fruit.txt

Its always a good idea to remember where these good ideas come from :-)

One side-effect of learning perl is that you become unable to write non-trivial awk, IME.

Replies are listed 'Best First'.
Re: Re: Re: Finding part of a file
by impossiblerobot (Deacon) on Dec 04, 2001 at 22:07 UTC
    I like sed:

    sed -n '/banana/,/grape/p' fruit.txt

    but find that almost anything I could do in sed, I would prefer to do in Perl. :-)

    Impossible Robot