【转】shell编程:16进制与10进制转换

dec2hex

#!/bin/sh
printf "%X\n" $1


hex2dec

#!/bin/sh
echo $((0x$1))


原链接:http://pank.org/blog/2004/07/shell-dec2hex-hex2dec.html

posted on 2015-01-05 16:37  教员的小学森  阅读(1448)  评论(0编辑  收藏  举报