prrgrrmmng Show more
sed 's/`/`%60`/g;s/[\]/`%5C`/g;s/%[0-9A-F]\{2\}/`&`/g' | tr '`' '\n' | sed '/^%[0-9A-F]\{2\}$/!s/%/`%25`/' | tr '`' '\n' | awk '$0!~/%/{printf("%s",$0)}/%/{sub("%","0x");printf("\\%04o",$0)}' | xargs -0 printf '%b'
re: prrgrrmmng Show more
hey prestohttps://git.ladys.computer/Shushe/commitdiff/0.2.4..0.3.0
what she had:
› awk '$0!~/%/{printf("%s",$0)}/%/{sub("%","0x");printf("\\%04o",$0)}'
the portable awk script:
› awk '$0!~/%/{printf "%s",$0}/%/{sub("%","0x");cmd="xargs printf \"%04o\"";printf "%s","\\";printf "%s",$0|cmd;close(cmd)}'
for some reason gawk thinks that printf should not interpret its arguments the same as printf on the command line so instead you have to pipe to it if you need that bit
A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.
re: prrgrrmmng
hey presto
https://git.ladys.computer/Shushe/commitdiff/0.2.4..0.3.0