reopen 461653 thanks On Sun, 2008-02-03 at 22:13:38 +0100, Sven Joachim wrote: > after the "fix" for bug #461653 I get tons of errors in my scripts for > redirecting messages to stderr: > > ,---- > | possible bashism in baz line 13 (should be >word 2>&1): > | echo "foobar" >&2 > `----
> According to > http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html, > sections 2.7.5 and 2.7.6, the constructions <&word and >&word are > perfectly valid /bin/sh syntax. Please don't complain about them. Hmm, actually no, I was wrong in [0], and had forgotten how I tripped into this. My original bug report was correct, maybe not clear enough, though. In the original mail I referred to redirecting to the same file, and not file descriptor. Anyway the problem comes with something like: echo foo >&/dev/null echo foo &>/dev/null Those will fail in dash (for example), and as can bee seen from SUSv3 the only supported tokens after [n]>& are digits or '-'. Anything else gets an unspecified behaviour. I guess the biggest problem is that word can be anything which at the end expands to those valid tokens. regards, guillem -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

