[PLUG] grep question

Felix Lee felix.1 at canids.net
Sun Aug 3 02:51:02 UTC 2003


Jeme A Brelin <jeme at brelin.net>:
> Of course, I'd probably use perl.

The perl version:
    perl -ne 'print if /xxx/ .. eof' file

is basically identical to the sed version:
    sed -n '/xxx/,$ p' file

and the awk version:
    awk '/xxx/, END { print }' file

I can't think of any particular reason to prefer one over another
for simple things like this.  Use whatever's convenient and
familiar.
--




More information about the PLUG mailing list