From owner-freebsd-bugs Fri Mar 31 8:32:17 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from raven.ravenbrook.com (raven.ravenbrook.com [193.82.131.18]) by hub.freebsd.org (Postfix) with ESMTP id D9AE637B652 for ; Fri, 31 Mar 2000 08:32:14 -0800 (PST) (envelope-from rb@ravenbrook.com) Received: from [193.82.131.28] (skylark.ravenbrook.com [193.82.131.28]) by raven.ravenbrook.com (8.9.3/8.9.3) with ESMTP id RAA00426; Fri, 31 Mar 2000 17:32:01 +0100 (BST) Mime-Version: 1.0 X-Sender: rb@pop3.ravenbrook.com Message-Id: Date: Fri, 31 Mar 2000 17:31:46 +0100 To: freebsd-bugs@freebsd.org From: Richard Brooksby Subject: Something funny about ampersand in /bin/sh Cc: Ravenbrook System Administrators Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [Please retain Cc line when reply to this message.] I've just installed FreeBSD 3.4 on our new server and started migrating various things from our old server (running FreeBSD 2.2.8). One of my shell scripts broke, claiming "ambiguous redirection". By trial and error I discovered that ampersands are being treated specially in the shell in some way. For example, this no longer works: echo 2>&1 foo Instead of writing "foo" to stdout this puts "foo" in a file called "1". This looks like a serious bug in the shell to me, since it breaks a lot of shell scripts which use this kind of redirection. Mysteriously, this works: sh -c 'echo 2>&1 foo' but this doesn't: su -fm root -c 'echo 2>&1 foo' Since our server relies on this kind of redirection I'd appreciate a workaround as soon as possible. Thanks. -- Richard Brooksby Senior Consultant Ravenbrook Limited, 51 St. Andrew's Road, Cambridge CB4 1DH, UK Tel +44 1223 519215 Fax +44 870 1641432 www.ravenbrook.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message