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