text search/replace utility

V

Vic Dura

Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?

For example something like:

c:> program foo.bar "old string" "new string"

where "program" is the program name, foo.bar is file name in which
all occurrences of "old string" are replaced with "new string"

I have a old program called MiniTrue that does this, but it has
problems with LFNs. Does anyone know of another freeware that could do
this?

Thanks.
 
W

Will McGugan

Vic said:
Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?

For example something like:

c:> program foo.bar "old string" "new string"

where "program" is the program name, foo.bar is file name in which
all occurrences of "old string" are replaced with "new string"

I have a old program called MiniTrue that does this, but it has
problems with LFNs. Does anyone know of another freeware that could do
this?

Google for 'grep'.

Will McGugan
 
A

Art

Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?

For example something like:

c:> program foo.bar "old string" "new string"

where "program" is the program name, foo.bar is file name in which
all occurrences of "old string" are replaced with "new string"

I have a old program called MiniTrue that does this, but it has
problems with LFNs. Does anyone know of another freeware that could do
this?

A couple of possibilities:

http://www.codeproject.com/string/cleanrsubmission.asp
http://www.gnu.org/software/emacs/emacs.html#Whatis

Art

http://home.epix.net/~artnpeg
 
D

Demetris

Vic said:
Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?
Hi, Vic.
I think sed or super sed for Windows is what you need. I was in a
similar search recently and I have collected a few links. They have
binaries for Win32, and also links to documentation and to many examples.

A home page for sed:
http://www.pement.org/sed/
As well as various versions of sed, this site lists and describes
various other CLI and GUI tools for text replacement in Windows
(including MiniTrue).

The SED $HOME at SourceForge:
http://sed.sourceforge.net/
Also has the latest version of super sed:
http://sed.sourceforge.net/grabbag/ssed/

The Wikipedia article has a number of links at the bottom:
http://en.wikipedia.org/wiki/Sed

Greetings,
Demetris
 
B

B. R. 'BeAr' Ederson

Does grep do string replacement?

Few special ones do. (Like Intelligence Services PDGREPPE.) But that's
not really common. On *nix systems replace is usually done by perl, awk,
sed or similar tools.

If you need a more simple tool without too much options and without
RegEx support you might have a look at Gsar:

http://gnuwin32.sourceforge.net/packages/gsar.htm

Although it doesn't permit wildcards, it *does* let you replace any
char in binary files, too.

HTH.
BeAr
 
B

Bjorn Simonsen

Vic Dura wrote in said:
Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?
I have a old program called MiniTrue that does this, but it has
problems with LFNs. Does anyone know of another freeware that could do
this?

Gsar (General Search and Replace> by Tormod Tjaberg, at
<http://home.online.no/~tjaberg/>

gsar112.zip
http://home.online.no/~tjaberg/gsar112.zip
General Search And Replace on files. (Documentation & Source).
The archive contains a WIN32 executable.


All the best,
Bjørn Simonsen
 
M

Michael Salem

Vic said:
Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?

Minitrue (just type Minitrue into the Firefox address bar). Hasn't been
changed since 1999, but there's little need to. Source code is
available. Binaries for Linux and 16- and 32-bit DOS (and MS Windows's
command-line windows).

HTH,
 
V

Vic Dura

Does anyone know of a freeware win32 text file search/replace utility
that can do global search/replace from the command line?

Thanks to all who replied, particularly B. R. 'BeAr' Ederson and Bjørn
Simonsen for the recommendation of GSAR. It worked very well for what
I was trying to do.

Regards,
Vic Dura
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top