perl -i.bak -pe 's/frog/toad/g' txtfile
This one-liner will save your old file into txtfile.bak, and modify txtfile by changing every occurrence of "frog" into "toad".
See perlrun for details on the command line arguments.
In reply to Re: substitute a word in the whole file .. how ???
by dbwiz
in thread substitute a word in the whole file .. how ???
by star7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |