Bash shell script to convert Decimal to Hexadecimal and Octal
codeaft.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
codeaft@codeaft:~$ bash codeaft.sh
———————————————————————————————————————————
Script to convert Dec To Hex and Oct number
———————————————————————————————————————————
Decimal=65535
Octal=177777
Hexadecimal=ffff
———————————————————————————————————————————
codeaft@codeaft:~$
Dear User, Thank you for visitng Codeaft. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.