base conversion shell script