@SergiyKolodyazhnyy Although I agree with the spirit of
your edit, my code was actually correct, and I've re-edited to clarify that particular
read
usage explicitly.
read -r
by itself with no variable name, as
I used there, is not POSIX, and if a shell chooses to permit it, it may define what behavior it calls for.