2

My beloved TextPad says "out of memory" after a while when trying to perform this operation. Next best (i.e. simplest/fastest) free tool to do this?

2 Answers 2

6

Install ActivePerl (only 25MB .msi file) and run this one-liner:

perl -pe "s/regex/replacement/g" <input.txt >output.txt

You can even use it for in-place editing like this:

perl -pi.bak -e "s/regex/replacement/g" file.txt
1
  • I just happened to have Perl installed. Thanks! (@fcorrao I also +1'd you)
    – Kev
    Apr 2, 2013 at 13:23
6

Install cygwin and use sed to perform the search and replace.

e.g. sed -e 's/findthis/replacewiththis/g' < /path/to/bigfile > /path/to/newfile

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .