starting to convert some bash scripts to shell to enable use with Ubuntu dash