Small functions for bash shell scripts