`cat` using only bash built-ins, binary-safe (and extremely slow): while LANG=C IFS= read -rd $'\0' -n 1 a; do ([ -z "$a" ] && echo -ne '\x00' || echo -n "$a") ; done <input >output
Everything in that tweet is built in. I checked with strace just to be sure. All of printf, [, test, echo are listed in the bash manpage as builtins.
-
-
In some old versions (can't name exact numbers, sorry) echo is not a built-in. Ran into this on some prehistoric unices and shot myself in the foot bcz some core .so files were corrupted due to messed up clustered filesystem.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.