Programming: Bash and Batch

Programming: Bash and Batch

When you need automation to get remove daily repetitive work by a script. Every programmer will face the same first problem, the code doesn’t work perfectly on other computers then the test computer.

To tackle this problem it’s important to use standardization and be as little reliable on system specific libraries.

When you are working in a multi-disciplinair team, using code like Python for scripting can create some challenges to get it to work on their laptop. Then it is easier to go for the native scripting of the computer. Bash for Linux Shell scripting and the little less easy to use, Batch for windows. Even PowerShell for Windows can be powerful, I try to avoid it. Keeping one native scripting language per Operating System is enough for me. It is even possible to do bash scripting on windows using MSYS or CYGWIN, but then we are back at not native.

Linux Bash

Bash is a specific shell language for Linux O/S. Next to bash there is also ash, sh and zsh. All look similair but have small code breaking differences.

Windows Batch

It is not always straigh forward, but with some help from stackoverflow, it’s a powerfull tool to create easy deployments.

Other languages

Other languages I use on daily basis, are Rust, C#, C++ and microPython for Micro Controllers Units. Some prefered MCU’s are the STM32, ESP32, ESP8266, Arduino Uno.