# old: foo.dat.bak new: foo.dat perl -i.bak -ne 'print unless /^AB.*C$/' foo.dat # OR # old: foo.dat new: foo.dat.fixed perl -ne 'print unless /^AB.*C$/' foo.dat > foo.dat.fixed
In reply to Re: Writing into files and RegExp
by davidrw
in thread Writing into files and RegExp
by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |