From my understanding, the following should send 'test' on standard error in tcsh:
echo test >&2
However, it instead writes 'test' to a file named 2, and when I look through my history, I find that what actually executed was
echo test > & 2
I'm not sure what layer is inserting those spaces, but can I stop it somehow? If not, I guess I could always use > /dev/stderr instead.
echo test >&2prints to stderr. At least in my bash. – Oliver Salzburg♦ May 23 '12 at 14:43>as a shell indicator is pretty confusing in your code snippets in the current context ;) – Oliver Salzburg♦ May 23 '12 at 14:44echo test '>&2'? No idea if that works, and don't have tcsh to try it. – kevlar1818 May 23 '12 at 15:36