Created
August 5, 2023 04:29
-
-
Save elderica/e2a2fb012e50f23af742bb1874d472eb to your computer and use it in GitHub Desktop.
awkbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export LANG=C LC_ALL=C | |
| LF=$(printf '\\\n_'); LF=${LF%_} | |
| od -A n -t x1 -v | | |
| tr -Cd '0123456789accdefABCDEF\n' | | |
| tr 'abcdef' 'ABCDEF' | | |
| sed "s/../&$LF/g" | | |
| grep -v '^$' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export LANG=C LC_ALL=C | |
| awk ' | |
| BEGIN { | |
| MAXLENFMTSTR = 2048 - length("printf "); | |
| for (i=1; i<256; i++) { | |
| fmt[i] = sprintf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export LANG=C LC_ALL=C | |
| bcrc=$(mktemp) | |
| echo 'obase=10;ibase=16;' >$bcrc | |
| tr 'abcdef' 'ABCDEF' | | |
| bc $bcrc | |
| rm $bcrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment