Bash Substitutions

Bash supports various constructs for substituting contents of variables.

Setting default values:

Substituting substring:

Command substitutions:

The latter is easier to nest:

Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.