mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-05-12 11:42:20 -04:00
10 lines
205 B
Bash
Executable file
10 lines
205 B
Bash
Executable file
#! /bin/bash
|
|
|
|
n=0
|
|
hex=0
|
|
echo "Decimal to hexadecimal converter:"
|
|
echo -n "Enter number in decimal format : "
|
|
read n
|
|
hex=`echo "obase=16;ibase=10; $n" | bc`
|
|
echo "$n is equivalent \"$hex\" in hexadecimal"
|
|
|