From owner-freebsd-stable Thu Dec 23 5:58:40 1999 Delivered-To: freebsd-stable@freebsd.org Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.130.111.12]) by hub.freebsd.org (Postfix) with ESMTP id C477E14DC1 for ; Thu, 23 Dec 1999 05:58:37 -0800 (PST) (envelope-from pfeifer@dbai.tuwien.ac.at) Received: from alphard (alphard [128.130.111.37]) by vexpert.dbai.tuwien.ac.at (8.9.1/8.9.1) with ESMTP id OAA15976; Thu, 23 Dec 1999 14:57:58 +0100 (MET) Date: Thu, 23 Dec 1999 14:57:56 +0100 (MET) From: Gerald Pfeifer To: Marcin Cieslak Cc: freebsd-stable@freebsd.org Subject: Re: /bin/test broken ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 23 Dec 1999, Marcin Cieslak wrote: > Recent -stable: > > $ /bin/test 1 -ne 0 ] > test: syntax error > $ [ 1 -ne 0 ] > $ > > but on Solaris 2.5 in both sh and ksh: > > $ /bin/test 1 -ne 0 ] > $ [ 1 -ne 0 ] > $ SuSE Linux 6.3: sh-2.03$ /usr/bin/test 1 -ne 0 ] /usr/bin/test: too many arguments > What's _the_ standard? You would have to consult POSIX or whatever, I guess, but clearly the first variant is not portable (in practice) so one should refrain from using it anyway. http://www.UNIX-systems.org/ has a lot on standards, by the way. Gerald -- Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message