citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

hex2dec (161B)


      1 #!/usr/bin/env bash
      2 
      3 if [ ! -z "$1" ]; then
      4   hash="$1"
      5 else
      6   read -r hash
      7 fi
      8 
      9 <<<"$hash" exec tr '[:lower:]' '[:upper:]' | xargs printf 'ibase=16; %s\n' | bc