Foreach option ? Multiple find & replace in multiple fil

General questions about using TextPad

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

Post Reply
samahita
Posts: 7
Joined: Mon Feb 20, 2006 6:49 am
Contact:

Foreach option ? Multiple find & replace in multiple fil

Post 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.
Bhikkhu Samahita, Sri Lanka
http://What-Buddha-Said.net/
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post 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.
I choose to fight with a sack of angry cats.
samahita
Posts: 7
Joined: Mon Feb 20, 2006 6:49 am
Contact:

Shell script for windows ?

Post by samahita »

Thanx for info.

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

If so where ?

Thanx in advance :?
Bhikkhu Samahita, Sri Lanka
http://What-Buddha-Said.net/
bveldkamp

Post by bveldkamp »

samahita
Posts: 7
Joined: Mon Feb 20, 2006 6:49 am
Contact:

Unix in Windows

Post by samahita »

Thanx.

Have just downloaded Cygwin:
http://www.cygwin.com/
which also seems to be able to
emulate most unix commands.
Bhikkhu Samahita, Sri Lanka
http://What-Buddha-Said.net/
Post Reply