perl -ne 'if (/valid/) { print; exit }' < data
tac data | perl -ne 'if (/valid/) { print; exit }'
"tac" is reverse "cat".
In reply to Re: Quick version of "first record" to "last record" ?
by Anonymous Monk
in thread Quick version of "first record" to "last record" ?
by perlcapt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |