Page 1 of 1

Foreach option ? Multiple find & replace in multiple fil

Posted: Mon Feb 20, 2006 7:26 am
by samahita
Friends:

I have a list (file1) of ~1300 words ($1) I wish to replace
to ~1300 other words ($2) in 22 different files...

I csh a foreach i cat file1 | sed {} etc. command would do it.

Can textpad4 do such foreach loop? I have tried a macro
to find and replace each word in each open file,
but I cannot get it to work to the end of file1.

Thanx in advance for you patience.

Posted: Mon Feb 20, 2006 3:21 pm
by talleyrand
Unfortunately, TextPad would not be able to perform those operations. The best you could do would be use WildEdit and run it ~1300 times so I'd say your shell script would be the winner for ease of use.

Shell script for windows ?

Posted: Tue Feb 21, 2006 8:10 am
by samahita
Thanx for info.

Is there a csh, nawk, sed etc. emulator for windows XP ?

If so where ?

Thanx in advance :?

Posted: Tue Feb 21, 2006 9:24 am
by bveldkamp

Unix in Windows

Posted: Wed Feb 22, 2006 7:11 am
by samahita
Thanx.

Have just downloaded Cygwin:
http://www.cygwin.com/
which also seems to be able to
emulate most unix commands.