diff options
-rw-r--r-- | modules/dev.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/dev.inc b/modules/dev.inc index fcde631..3330741 100644 --- a/modules/dev.inc +++ b/modules/dev.inc @@ -205,9 +205,9 @@ __init() { local t # init __hex2bin t="7a32337465737431323374657374" - if [ "$( printf z23test123test | xxd -p )" = "$t" ]; then + if [ "$( printf z23test123test | xxd -p | tr -d '\n ' )" = "$t" ]; then #echo "Using xxd" >&2 - __bin2hex() { xxd -p; } + __bin2hex() { xxd -p | tr -d '\n '; } elif [ "$( printf z23test123test | od -t x1 -An | tr -d '\n ' )" = "$t" ]; then #echo "Using od" >&2 __bin2hex() { od -t x1 -An | tr -d '\n '; } |