#!/bin/bash echo "type a hex number" read hexNum echo -n "The binary value of $hexNum=" echo "obase=2; ibase=16; $hexNum" | bc