Skip to content

A Review Of Linux Shells

Published On:
Dec 19, 2019
Last Updated:
Dec 19, 2019

Bash

Bash (or bash), the Bourne-Again SHell, is a ubiquitous shell which is the default shell for many Linux distributions (it is the default GNU shell). Bash succeeded the older Bourne Shell (sh), but remained backwards compatible with Bourne shell scripts.

Language Functionality 8/10
Language Readability 3/10

Bash provides the following popular keywords:

  • time: For measuring the runtime of a command.

One of Bash’s disadvantages is is hard-to-read shell syntax, when compared to popular languages in use today such as Python. The comparison operators -eq has to be used for numerical comparison, while you have to use = if you want to do string comparison. And if you are like me you are forever forgetting the subtle difference between single brackets [, double brackets [[ and the test command when it comes to if statements.

For example, this is what a basic if statement looks like in bash:

Terminal window
if [ $my_var -eq 2.0 ]
then
echo "my_var equalled 2.0"
fi

Fish

Fish, the Friendly Interactive SHell,

Website: https://fishshell.com/

zsh