4 ms·
They have a point - I can’t find any traces of a shell library implementing image parsing without calling out to a third-party tool written in not-shell. You a
by floatingatoll 8y ago
They have a point - I can’t find any traces of a shell library implementing image parsing without calling out to a third-party tool written in not-shell.
You also have a point - I’m seriously debating if I can write one in an evening solely to say that one now exists. (I lost the debate with myself, sadly.)
EDIT: I mean “source language bash”, not “target language bash”, my emscripten friends.
- theoh 8y agoThere are problems with the manipulation of binary data in bash, as discussed here: https://unix.stackexchange.com/questions/278639/how-can-i-work-with-binary-in-bash-to-copy-bytes-verbatim-without-any-conversio https://unix.stackexchange.com/questions/278639/how-can-i-wo... In particular, the value 0 can't be stored in a bash variable, which almost completely rules out the possibility of byte-by-byte processing of general binary data. It's probably possible with absurd hacks. Quite apart from that, error handling in bash is an awkward chore which few scripts get right. It's a very unappealing language for writing anything more than a five-line script. https://www.davidpashley.com/articles/writing-robust-shell-scripts/ https://www.davidpashley.com/articles/writing-robust-shell-s...
- floatingatoll 8y agoIf you read a byte without EOF and have a variable length of 0 afterwards, you read a NUL.