Removed bash-isms to enable this script to run on ash/sh on BusyBee