output redirections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I rebuilt all packages in Debian in a chroot using dash as /bin/sh,
which uncovered quite a lot of problems in build scripts.
One of the problems is about output redirection.

I understand that:
  command &>/dev/null
is a bashism. (with dash, it forks a subshell)

the "common" replacement is:
  command >/dev/null 2>&1
Which works fine with dash. However, I couldn't find any reference to
">&1" in the posix standard. Is it really posix-compliant? Shouldn't we
use instead:
   command >/dev/null 2>/dev/null

Thank you,
-- 
| Lucas Nussbaum
| lucas@xxxxxxxxxxxxxxxxxx   http://www.lucas-nussbaum.net/ |
| jabber: lucas@xxxxxxxxxxx             GPG: 1024D/023B3F4F |
-
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux