Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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
share|improve this answer
    
I just happened to have Perl installed. Thanks! (@fcorrao I also +1'd you) –  Kev Apr 2 '13 at 13:23

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.