VOGONS


First post, by keropi

User metadata
Rank l33t++
Rank
l33t++

Hiya!!!

I am searching (without luck 😐 ) for a DOS utility that can replace strings inside a text file...

something like this: awesomeutil.exe test.txt dog cat
so that awesomeutil opens test.txt finds the string "dog" and replaces it with "cat"

All I can find are some enhanced scripting methods that only work in win2k and above dos-box "termninals" ...

Any help will be greatly appreciated, thanks! 😊

Last edited by keropi on 2010-11-03, 19:40. Edited 1 time in total.

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 3 of 9, by keropi

User metadata
Rank l33t++
Rank
l33t++
Harekiet wrote:

Find a set of djgpp converted unix tools that run in dos

that was the easy part, but I am confused about what part of the djgpp does what I want 😢 😕

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 7 of 9, by keropi

User metadata
Rank l33t++
Rank
l33t++

🤣 nice, let's see IF I can work with them , since on wikipedia I seeonly sed might do the job but looks complicated 🤑 🤑 🤑

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 9 of 9, by keropi

User metadata
Rank l33t++
Rank
l33t++

I am only interested in a dos-only solution that does not need any kind of extenders... I am reading on sed and it's DOS versions here: http://www.cornerstonemag.com/sed/ but frankly it seems too much complicated for the small/simple use I plan for it... line buffers , operations and all are great , but for more complex jobs...

edit:

I think I found what I need , it is called MiniTrue and from the manual it looks promising:

Example 1 - The original MiniTrue

mtr -rnw * - Eastasia = Eurasia

This will replace all instances of "Eastasia" with "Eurasia" in all
files on the current drive. The -r option is necessary for scanning
to recurse through the subdirectories. The -n option will make
replacements automatically, and the -w option will only find whole
words

edit2: complete success! minitrue 2.02b does EXACTLY and easily the job 😁 anyone interested can grab it here: http://www.idiotsdelight.net/minitrue/
thanks for all the suggestions/pointers/help , if it wasn's for the djgpp/grer/sed/xyz stuff I would have never found about minitrue 😊

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website