Date: Wed, 17 Jul 2002 04:26:13 GMT From: Abc Xyz <abc@anchorageinternet.org> To: Jean-Yves Lefort <jylefort@brutele.be> Subject: Re: /dev/null and 2>&- Message-ID: <200207170426.g6H4QDow098383@anchorageinternet.org>
next in thread | raw e-mail | index | archive | help
> > i just installed 4.6-RELEASE, and notice that
> > the '2>&-' sh (FBSD) construct seems to be broken.
> > i am going thru all my scripts having to change
> > it to /dev/null ...
> >
> > i figure it's not realistic to assume a bug this
> > obvious would make it to release stage, so my
> > question is - is something else going on?
> > or is this just due to changes in 'sh'?
> > is it a bug? or is it a permenent change?
>
> You probably come from a Linux background, where /bin/sh is generally
> symlinked to /bin/bash.
>
> On FreeBSD, /bin/sh is the historical UNIX shell, the Bourne Shell.
> The '&>' (aka '>&') construct is a bashism, and won't work using
> /bin/sh.
>
> The /bin/sh equivalent of bash's 'cat foo &>file' is 'cat foo >file
> 2>&1'.
SH(1) FreeBSD General Commands Manual SH(1)
NAME
sh - command interpreter (shell)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207170426.g6H4QDow098383>
