sed (or awk) for Windows -- NOT GPLed

Posted by: Roger

sed (or awk) for Windows -- NOT GPLed - 28/01/2009 08:01

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.
Posted by: Roger

Re: sed (or awk) for Windows -- NOT GPLed - 28/01/2009 08:53

Brian Kernighan has AWK on his website; appears to be free to distribute in binary form (as long as the copyright is included).
Posted by: wfaulk

Re: sed (or awk) for Windows -- NOT GPLed - 28/01/2009 13:21

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.
Posted by: Roger

Re: sed (or awk) for Windows -- NOT GPLed - 28/01/2009 16:40

Yeah, but I hate VBScript...
Posted by: wfaulk

Re: sed (or awk) for Windows -- NOT GPLed - 28/01/2009 18:19

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.
Posted by: mlord

Re: sed (or awk) for Windows -- NOT GPLed - 29/01/2009 00:01

And it will further lock that database app into Microsoft's clutches..
Posted by: wfaulk

Re: sed (or awk) for Windows -- NOT GPLed - 29/01/2009 00:59

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.
Posted by: Roger

Re: sed (or awk) for Windows -- NOT GPLed - 29/01/2009 05:17

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.
Posted by: siberia37

Re: sed (or awk) for Windows -- NOT GPLed - 29/01/2009 21:31

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.
Posted by: Roger

Re: sed (or awk) for Windows -- NOT GPLed - 30/01/2009 07:17

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.