From owner-freebsd-questions Tue Jul 16 21:26:27 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 9032E37B400 for ; Tue, 16 Jul 2002 21:26:24 -0700 (PDT) Received: from anchorageinternet.org (groggy.anc.acsalaska.net [208.151.119.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48BA143E42 for ; Tue, 16 Jul 2002 21:26:23 -0700 (PDT) (envelope-from abc@anchorageinternet.org) Received: (from abc@localhost) by anchorageinternet.org (8.12.3/8.11.6) id g6H4QDow098383; Wed, 17 Jul 2002 04:26:13 GMT (envelope-from abc@anchorageinternet.org) Date: Wed, 17 Jul 2002 04:26:13 GMT From: Abc Xyz Message-Id: <200207170426.g6H4QDow098383@anchorageinternet.org> Subject: Re: /dev/null and 2>&- X-Mailer: Umail v2.3 To: "freebsd-questions" To: Jean-Yves Lefort 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 > > 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