Admittedly that's very filthy, but if you use eof() you loose the last line (or at least I do). I'm sure there's a *far* better wholly perl solution, but that works just fine (if you've got a unix and gnu ;o)# cnt=`wc -l filename | sed -e 's/ *\([0-9]\+\).*/\1/'` # perl -ni -e 'print if /^CPN/ .. '$cnt';' filename
broquaint
In reply to Re: How to remove lines out of an ascii file
by broquaint
in thread How to remove lines out of an ascii file
by juo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |