shell十进制转十六进制

dec2hex(){
    printf "0x%x" $1
}

a=$(dec2hex 2131165531)
echo $a
原文地址:https://www.cnblogs.com/ggzhangxiaochao/p/13845383.html