From owner-freebsd-questions Tue Jul 16 18:30: 5 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CDBC37B400 for ; Tue, 16 Jul 2002 18:30:00 -0700 (PDT) Received: from mirapoint2.brutele.be (mirapoint2.brutele.be [212.68.193.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E00C43E42 for ; Tue, 16 Jul 2002 18:29:59 -0700 (PDT) (envelope-from jylefort@brutele.be) Received: from gateway.lefort.net ([213.189.162.78]) by mirapoint2.brutele.be (Mirapoint) with ESMTP id BBM61789; Wed, 17 Jul 2002 03:29:50 +0200 (CEST) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id 648F0152AE; Wed, 17 Jul 2002 03:29:50 +0200 (CEST) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id B061A2304B; Wed, 17 Jul 2002 03:29:44 +0200 (CEST) Date: Wed, 17 Jul 2002 03:29:44 +0200 From: Jean-Yves Lefort To: Abc Xyz Cc: freebsd-questions@FreeBSD.org Subject: Re: /dev/null and 2>&- Message-Id: <20020717032944.63856c77.jylefort@brutele.be> In-Reply-To: <200207160805.g6G85rRA001665@anchorageinternet.org> References: <200207160805.g6G85rRA001665@anchorageinternet.org> X-Mailer: Sylpheed version 0.7.8 (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 16 Jul 2002 08:05:53 GMT Abc Xyz wrote: > 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'. Regards, Jean-Yves Lefort -- Jean-Yves Lefort jylefort@brutele.be http://void.adminz.be/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message