Programming Tutorials

Decimal to hexadecimal converter in Shell Script

By: Vivek G in Linux Tutorials on 2011-01-29  

This shell script converts decimal to hexadecimal.
   n=0
hex=0
echo "Decimal to hexadecimal converter ver. b0.1"
echo -n "Enter number in decimal format : "
read n
hex=`echo "obase=16;ibase=10; $n" | bc`
echo "$n is equivalent \"$hex\" in hexadecimal"





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Linux )

Latest Articles (in Linux)