Create Linux Bash and Windows batch scripts simultaneously with Batsh


Batsh is obviously at an early stage of development. The documentation is sparse, and programmers very quickly encounter the limits of the scripting language.

Development has slowed down considerably, given that the first versions of Batsh appeared on a monthly basis. The latest version 0.6.0 was released in September 2014, nearly a year after its predecessor. On top of that, Windows PowerShell is slowly but surely replacing the old batch scripts. Nevertheless, Batsh can generate base frames for Bash scripts and batch files in its current state. In particular, while loops and if queries turn out to be significantly shorter and clearer in Batsh.

The Batsh approach is still quite impressive: You only need to develop one script and compile it for the target platforms, saving yourself the bother of installing a feature-rich interpreter like Python or Ruby. It thus remains to be seen whether other developers give a hand and drive the project forward.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • SHC: Bash Script Compiler

    The Bash Shell Script Compiler converts shell scripts directly into binaries. Compiling your scripts provides protection against accidental changes, but you will have to contend with some quirks.

  • Bash Alternatives

    Don't let your familiarity with the Bash shell stop you from exploring other options. We take a look at a pair of alternatives that are easy to install and easy to use: Zsh and fish.

  • Bash Tuning

    In the old days, shells were capable of little more than calling external programs and executing basic, internal commands. With all the bells and whistles in the latest versions of Bash, however, you hardly need the support of external tools.

  • Kotlin Programming Language

    Kotlin, a small island in the Gulf of Finland, is also the name of a new programming language that aims to become a modern alternative to Java.

  • Hardware Detection

    If you need fast answers for what's inside, you can use a Bash script to obtain an inventory of hardware on your Linux system.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More