Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#318534 - 28/01/2009 08:01 sed (or awk) for Windows -- NOT GPLed
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
I need to send a batch file to a customer that needs to do a search-and-replace in a bunch of database scripts.

Windows doesn't have anything built in (or does it?), so I'm looking for an implementation of SED or AWK that I can include. Stuff under the GPL (or similar) is not an option.
_________________________
-- roger

Top
#318536 - 28/01/2009 08:53 Re: sed (or awk) for Windows -- NOT GPLed [Re: Roger]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Brian Kernighan has AWK on his website; appears to be free to distribute in binary form (as long as the copyright is included).
_________________________
-- roger

Top
#318546 - 28/01/2009 13:21 Re: sed (or awk) for Windows -- NOT GPLed [Re: Roger]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
You should be able to use VBScript. It's built into Windows; you don't have to install anything. The extension .vbs is already associated with the interpreter.
_________________________
Bitt Faulk

Top
#318552 - 28/01/2009 16:40 Re: sed (or awk) for Windows -- NOT GPLed [Re: wfaulk]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Yeah, but I hate VBScript...
_________________________
-- roger

Top
#318557 - 28/01/2009 18:19 Re: sed (or awk) for Windows -- NOT GPLed [Re: Roger]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
As you should, but it will do the job without having to distribute anything other than the script. You could try JScript. It's marginally less odious and marginally less likely to be installed.
_________________________
Bitt Faulk

Top
#318566 - 29/01/2009 00:01 Re: sed (or awk) for Windows -- NOT GPLed [Re: wfaulk]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
And it will further lock that database app into Microsoft's clutches..

Top
#318568 - 29/01/2009 00:59 Re: sed (or awk) for Windows -- NOT GPLed [Re: mlord]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
A search and replace? I think any of us could implement that in any language we'd never even seen before in about half an hour, tops. Sounds like it's a one-off thing anyway. And he's already running it under Windows. That ship has sailed, my friend.
_________________________
Bitt Faulk

Top
#318574 - 29/01/2009 05:17 Re: sed (or awk) for Windows -- NOT GPLed [Re: mlord]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Originally Posted By: mlord
And it will further lock that database app into Microsoft's clutches..


The database app is already on Microsoft SQL Server. Nothing I can do about it.
_________________________
-- roger

Top
#318587 - 29/01/2009 21:31 Re: sed (or awk) for Windows -- NOT GPLed [Re: Roger]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
I have a GUI search and replace that is totally free if that works for you. It is called "My own free fully functional search and replace". It was made by a friend of mine who was tired of trying to find a free Windows search and replace.

Top
#318630 - 30/01/2009 07:17 Re: sed (or awk) for Windows -- NOT GPLed [Re: siberia37]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Originally Posted By: siberia37
I have a GUI search and replace that is totally free if that works for you. It is called "My own free fully functional search and replace". It was made by a friend of mine who was tired of trying to find a free Windows search and replace.


Thanks, but not really -- it needs to be a command-line app: I'm running it in a batch file.
_________________________
-- roger

Top