The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Looking for Unix-style scripting on Windows

I'm aware of MKS toolkit, which is very nice; however, I was wondering if there were anything out there for free. The syntax doesn't have to exactly match the C or K or Bourne Shell (though that would be nice (:=)), it could be in Python or Perl or whatever, I just don't feel like reinventing the wheel.
Steve Hirsch Send private email
Thursday, December 29, 2005
 
 
You could install cygnus you can script native Win32 apps as well as regular *nix utilities.
Simon Lucy Send private email
Thursday, December 29, 2005
 
 
Install Perl on Windows.  www.activestate.com, I believe.  They have a free version -- 5.6 by now.

Only drawback -- Windows doesn't support Unix style multi-tasking, so 'fork' and 'exec' don't work as they do on Unix.
AllanL5
Thursday, December 29, 2005
 
 
Bruce
Thursday, December 29, 2005
 
 
Python runs out of the box on Windows just like it does on Unix.

The "Native" scripting languages on Windows are VBScript and JScript, run via the windows script host. I think the real difference between the unix and windows scripting philosophy is that in Unix, you write scripts in the shell. As a result, it's easier for the admins since they already know the shell, but the shells suffer because they've got half-assed programmatic stuff stuck in there, and the programmers get pissed off becuase the shell script language is missing important (to them) stuff.

In Windows, you write scripts with "real" languages. The programmers are happier, but the admins aren't because they have to learn a new language to automate stuff.
Chris Tavares Send private email
Thursday, December 29, 2005
 
 
Another great scripting language for Windows is WinBatch (available at winbatch.com).  You can compile your programs if you want.

It gives you full control of applications (you can control them, click buttons, move windows, etc).  Plus a bunch of other things.

The compiler costs about $400 and the interpreted pack runs about $150 I think?  But very handy.
Eric D. Burdo Send private email
Thursday, December 29, 2005
 
 
I looked into Python once, it looked like a very nice language, but I didn't see many libraries. I'm assuming that I don't know where to look. Are things like the cut and sed and all those other nice things easily available, or does one need to write them all over again? Perl would be cool, too.
Steve Hirsch Send private email
Thursday, December 29, 2005
 
 
Why not Monad?
smalltalk Send private email
Thursday, December 29, 2005
 
 
>>>  I looked into Python once, it looked like a very nice language, but I didn't see many libraries.

Boy, you didn't look very hard. ;-)

Python's got TONS of libraries; the standard library is very rich, and there are lots and lots of addons.

As for cut and sed in specific: those commands only exist because shell isn't a real language.

Cut is the program that takes a string and extracts columns, yes? If you wanted to get the third field out of a string with | character separators, you'd do this:

  field = data.split("|")[2]

The split method splits a string on the given delimiter, and returns a list. You then index the list.

You still need to read in the file you're going to process, so if ALL you want to do is just pull out that one field, cut would be easier, but in general that's never "all you'll want to do".

sed is a little trickier, since there's no direct emulation, but anything you can do with sed you can do by just manipulating and replacing strings. Python's got a full regular expression library, so you're all set there.

The python library docs are here:

  http://www.python.org/doc/2.4.2/lib/lib.html

Take a look; you'll find all sorts of nifty stuff in there.
Chris Tavares Send private email
Thursday, December 29, 2005
 
 
Another +1 vote for Cygwin and ActiveState Perl. I've used both at various companies and they work great.
QADude Send private email
Friday, December 30, 2005
 
 
Services for UNIX is from Microsoft, and free. You get Korn and C shells, Perl 5.6.0, the usual tools, an NFS client and server, an NIS server, and a complete development subsystem.

I'm a CMD.EXE junkie myself, but SFU has helped me a lot.

http://www.microsoft.com/sfu
Raj Chaudhuri Send private email
Friday, December 30, 2005
 
 
AutoIT is, in my experience, better than WinBatch and it's free.

http://www.hiddensoft.com/autoit3/
Mr. Analogy {Shrinkwrap µISV} Send private email
Friday, December 30, 2005
 
 
SFU only works on Windows Server, not Home OS. I can try it at work, but I just rewrote the query to eliminate the white space.

I'll try the other link now. Thanks.

Steve
Steve Hirsch Send private email
Sunday, January 01, 2006
 
 
Steve, do you mean XP Home? Yes, that is a problem. It *does* work on XP Professional, which is what I use.
Raj Chaudhuri Send private email
Monday, January 02, 2006
 
 
Yup, XP Home. I guess MS wants me to upgrade the OS, but there're other ways to skin that cat (see above).
Steve Hirsch Send private email
Tuesday, January 03, 2006
 
 
autoit, solved many problems for me
its easy, short learning curve
n
Sunday, January 08, 2006
 
 
SFU is awful.  Why not download Unix from the creators of Unix and install it?  U/WIN.  http://www.research.att.com/sw/tools/uwin/

Get it before the a-holes at SBC remove it.  You can't help but like anything that David Korn helped to write...

-C
Christopher Send private email
Thursday, January 12, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz