@david_chisnall #xxd is nice, but typically comes with a #vim package, so that's kind of a weird build dependency 🙃
Fortunately, the code needed to do it myself isn't too large:
https://github.com/Zirias/xmoji/blob/master/tools/bin2cstr/src/bin2cstr.c
-> Very nice #C23 solves this! It's probably not too portable to require it just yet, but then it's just a matter of time 😊
It's not the only ctrl code. ctrl+[ is escape. ctrl+m is return. ctrl+c sends the ASCII "end of text" symbol. You can type these literal characters in Vim:
ctrl+v, ctrl+c
ctrl+v, ctrl+[
ctrl+v, ctrl+m
You'll see ^C^[^M
Save your file and then send them through the hex dump tool #xxd - :%!xxd
(to get back :%!xxd -r)
Freaking sweet, huh? Who knew that #ASCII held such secrets?!
Okay, so redirecting to redirection, you may have seen something like `cat something.txt >/dev/null` #devnull ...
Operaciones binarias y hexadecimales con xxd en GNU/Linux