#!/bin/bash
echo "1] 10==>2 2] 10==>8 3] 10==>16 4] exit"
while true
do
echo -n "Input your choice:";read choice
case $choice in
1)
echo -n "Input a dec number:"
read i1
echo "$i1==`echo "obase=2;$i1"|bc`";;
2)
echo -n "Input a oct number:";read oct
echo "$oct==`echo "obase=8;$oct"|bc`";;
3)
echo -n "Input a ox number;";read ox
echo "$ox==`echo "obase=16;$ox"|bc`";;
4) exit 1;;
*)
echo "Input error!"
exit 1;;
esac
done