这次写个脚本
oracle很多都是十六进制的,有时候需要转换成十或者二进制
#! /bin/bash
echo "input under one of :
1 16------>2
2 16------>10
"
read num
case $num in
1) echo "imput the number you want to change"
read n
echo -e "and so it's \c"
echo "ibase=16;obase=2;$n"|bc;;
2) echo "imput the number you want to change"
read n
echo -e "and so it's \c"
echo "obase= 10 ;ibase=16;$n" | bc;;
*) echo "not correct input";;
esac
~
阅读(1600) | 评论(0) | 转发(0) |