Many system administrators manage Unix derivatives other than Linux, so shell scripts have to work across platforms.
The first lines of a shell script can be enough to cause administrators headaches. Many Linux distributions supply scripts written in Bash (Bourne Again Shell [1]), and, because not all Unix derivatives actually include a Bash shell, porting the scripts additionally means replacing the interpreter.
The Bourne shell is the interpreter of choice for this task. In fact, it should generally be your first choice because only the Bourne shell (Sh) guarantees maximum compatibility. But, again, some attention to detail is recommended.
Shell Game
More recent Linux distributions don't include a separate binary for the Bourne shell. Instead, they provide a subset of Bash. Thus, the pseudo-Sh doesn't react like a genuine Bourne shell.
A script written in this shell isn't really Bourne shell-compatible. You will notice this on Unix systems like Solaris [2], where unexpected results can sometimes confound users (Figure 1).
Figure 1: The Bourne shell will react differently depending on the operating system.
The results can be anything from interruptions caused by
...
Use Express-Checkout link below to read the full article (PDF).
Administrators often write custom monitoring programs to make sure their daemons are providing the intended functionality. But simple shell tools are just as well suited to this task, and not just for systems that are low on resources.
Windows 10 brings an updated, fifth release of PowerShell that vastly simplifies the task of managing modules and software packages. The scripting language now also handles various formatted output from commands and selection lists.
The combination of Open Management Infrastructure standards and the performance of Windows PowerShell opens new perspectives on heterogeneous networks, making PowerShell a realistic option as a management console for Unix and Linux.