Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good alternative to Windows batch scripts? [closed]

What are some good alternatives to Windows batch scripts? We have a number of them and they are very "clunky" to work with. As our group is familiar with Java is Groovy a good option?

A lot of our scripts are used to prep dev databases so they involve a lot of cd mydir, hg fetch, sqlplus ..., etc..

like image 988
Marcus Leon Avatar asked Feb 09 '11 14:02

Marcus Leon


2 Answers

If you are interested in developing scripts for Windows than a technology developed specifically for Windows, like the PowerShell, is a sensible choice.

While groovy will probably allow you achieve your goal I don't think there is a particular advantage that it could offer.

Saying that, you have to consider familiarity factor and learning curve. You say developers have experience with Java and Groovy in which case running ant tasks via the groovy DSL can prove easier than learning PowerShell.

Regardless, consider developing your scripts using the TDD approach. Groovy offers plenty of frameworks (try Spock for example) while there are also ways to achieve that for PowerShell.

like image 55
mfloryan Avatar answered Sep 23 '22 22:09

mfloryan


Powershell, VBScript, Perl, Python. There are no shortages of good scripting languages that have a Windows implementation.

like image 44
tloach Avatar answered Sep 21 '22 22:09

tloach