A little help with SED please - clarifications.

Bob Ellison r_ellison at hpfcdq.HP.COM
Thu Apr 21 07:33:55 AEST 1988


How about

    sed '/BEGIN/,/END/p
    d' files...

in sh or ksh or

    sed '/BEGIN/,/END/p\
    d' files...

in csh?  These lines will include the BEGIN and END in the output, but will
strip all other lines.

I'd prefer to use awk:

    awk '/BEGIN/,/END/' files...


papillo the awkward
Bob Ellison



More information about the Comp.unix.questions mailing list