On Tuesday, 11 June 2013 at 12:37:53 UTC, Andrei Alexandrescu
wrote:
On 6/11/13 3:09 AM, Jacob Carlborg wrote:
On 2013-06-11 08:38, Nick Sabalausky wrote:
I just tried both on Debian 6:
nick@debian6:~$ cat 1< /dev/null
cfws
cat: write error: Bad file descriptor
nick@debian6:~$ echo meh 1< /dev/null
bash: echo: write error: Bad file descriptor
Maybe OSX behaves differently?
I get the same on Mac OS X 10.6.3 using bash. Is Andrei
perhaps using
another shell?
I use zsh. Indeed under bash I can reproduce the failure. But
if I run the printf-based test, it exits successfully.
Andrei
This is a good point, I kind of wondered why bash was the one
reporting echo failed.