3 ms·
> If the last line gets truncated between the `s` and the `p`, then `ls` gets executed. My shell[0] dies with a error "source file did not end with a newline".
by a1369209993 4y ago
> If the last line gets truncated between the `s` and the `p`, then `ls` gets executed.
My shell[0] dies with a error "source file did not end with a newline". This is easily solvable in general, regardless of what's in PATH, as long as the shell works correctly. Valid text files do not end with bytes other than 0x0A. Being truncated at the end of a line, on the other hand, is not manifestly obviously a error.
0: That I wrote, because of bugs other than this one in bash et al, such as $FILE_WITH_SPACES; not just "my shell that I use".