Batch commands

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Rick Randall

Batch commands

Post by Rick Randall »

I love regular expressions, but I'd like to have several search/replace actions in a file that I could pass to TextPad to execute. Furthermore, I'd like to be able invoke the program from the command line, specifying the input file, the search/replace file, and the output file. I've looked at the help and this site's tech support material (including this forum) and if TextPad can do this it escapes me so far.

Any pointers?

Thanks, Rick
Berend Hasselman

Re: Batch commands

Post by Berend Hasselman »

TextPad is not able to do what you want.
You want a commandline program to do a regular expression search and replace.
I would suggest hat you have a look at Gawk and/or Perl.
Gawk is a lot easier to learn and use than Perl and perfectly adequate for your purpose. It is a commandline program taking a script (using a very prowerful programming language), one or more input files and producing one or more output files of your choosing.

Goto the following site

http://gnuwin32.sourceforge.net/

Click on the indexentry Packages in the Download section.
Scroll down to Gawk, have a read and download.

It's worth the effort. I am a long time user of (g)awk and totally addicted.

Berend Hasselman
Post Reply