Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@lanodan @domi @ar @multisn8 @navi the IFS thing isn't really useful here* - read still reads newline-terminated lines, and i don't even want to do word splitting which is what IFS controls. what i want is `read -d '' line` to read a NUL-terminated "line" - this is real in bash and zsh but POSIX defines no useful options for read so dash doesn't have it either.
I looked it up and they actually added -d to read in POSIX.1-2024! can't wait for it to become real
* apparently it is, read trims trailing and leading whitespace if IFS is not set to '' which would break my script if it was passed filenames with that stuff which is definitely something i'd do, alongside putting newlines in filenames. i didn't catch this bug because none of the files i used had trailing or leading whitespace in there names