Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Created September 29, 2021 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphanetEX/9a0fecec3a47c8cf0db251504220e130 to your computer and use it in GitHub Desktop.
Save alphanetEX/9a0fecec3a47c8cf0db251504220e130 to your computer and use it in GitHub Desktop.
Example of alphabet covert dec to hex in ascii table
dec=97
counter=0
counter_disk=0
cant=0
read -p "Cantidad de discos a Formatear ?: " cant
while [ $counter -lt $cant ]
do
hex=$(printf "%x\n" $dec)
alphabet=$(printf "\x$hex\n")
printf "$alphabet\n"
((counter ++));
((dec ++));
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment