utils.sh: add some more functions.