3 ms·
one character sequence is interpreted as EOF I know this is just an example, but how would that happen?
by icebraining 9y ago
one character sequence is interpreted as EOF
I know this is just an example, but how would that happen?
- hrktb 9y agoYou can hit EOF or EOT in a stream of UTF-8 or other multi-byte encoding as part of a character. There must be ways to have it handled through something that understands character encodings and workaround the issue, but I know that dumb shell piping will fumble on those.
- JdeBP 9y ago% printf '\x04\necho EOT is not EOF in a pipe.\n' | bash bash: line 1: $'\004': command not found EOT is not EOF in a pipe. % Pipes do not contain line disciplines and thus do not do special character processing.