Helper functions commonly used when writing shell (for instance, Bash) scripts