Decodificador de hexadecimal escapado

This commit is contained in:
Sandino Araico Sánchez 2024-04-07 05:31:38 -06:00
parent 4d65f55bb0
commit 8a42c59beb
Signed by: KBrown
GPG key ID: 991D5D40CC62244F

18
scripts/hex2text Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
if [[ -z $1 ]] ; then
echo "usage: $0 <string>"
exit 1
fi
STR=$1
sed 's/\\x/:/g' <<< $STR \
| tr ':' "\n" \
| while read B ; do
#echo $B
[[ -n $B ]] && printf "\x$B"
done
echo