Valery Ushakov writes: > > The fact that TERM affects this is a sign that you likely have > something like a shell with line-editing interfering as RVP suggested > in another message.
This indeed seems to have been the case. Issuing stty raw ; cat file as a single command instead of two in the child shell (standard-issue NetBSD /bin/sh) made a difference.