Bash shell script to convert Decimal to Hexadecimal and Octal
gd.sh
#!/bin/bashecho"———————————————————————————————————————————"echo"Script to convert Dec To Hex and Oct number"echo"———————————————————————————————————————————"a=65535
echo-n"Decimal="$aprintf"\nOctal="%o $aprintf"\nHexadecimal="%x $aecho-e"\n———————————————————————————————————————————"
Output
godarda@gd:~$ bash gd.sh
———————————————————————————————————————————
Script to convert Dec To Hex and Oct number
———————————————————————————————————————————
Decimal=65535
Octal=177777
Hexadecimal=ffff
———————————————————————————————————————————
godarda@gd:~$
Dear User, Thank you for visitng GoDarda. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.