Ravi Sir's Cards › AWS
sh vs bash
This comparison card contrasts sh and bash. sh is described as pOSIX, small, often dash. bash is described as arrays, [[ ]], more features. The card pairs sh with tiny portable scripts, and bash with most ops scripts.
Read card text
What this card says
Shell
sh
POSIX, small, often dash.
bash
Arrays, [[ ]], more features.
Key points
Runs anywhere.
Linux default login shell.
Example
#!/bin/sh
Use when
Tiny portable scripts.
Most ops scripts.