From d79509759d6217b2bb548d04fd552c9c5c91b9c6 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Thu, 1 Aug 2019 15:20:50 +0200 Subject: [PATCH] Add small number tools --- bin/dec2hex | 2 ++ bin/hex2dec | 2 ++ 2 files changed, 4 insertions(+) create mode 100755 bin/dec2hex create mode 100755 bin/hex2dec diff --git a/bin/dec2hex b/bin/dec2hex new file mode 100755 index 0000000..47de1cb --- /dev/null +++ b/bin/dec2hex @@ -0,0 +1,2 @@ +#!/bin/bash +printf '%x\n' $1 | tr '[:lower:]' '[:upper:]' diff --git a/bin/hex2dec b/bin/hex2dec new file mode 100755 index 0000000..4910440 --- /dev/null +++ b/bin/hex2dec @@ -0,0 +1,2 @@ +#!/bin/bash +echo $((16#$1))