From owner-freebsd-hackers Sun Mar 9 05:22:13 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA20470 for hackers-outgoing; Sun, 9 Mar 1997 05:22:13 -0800 (PST) Received: from ajax.che.curtin.edu.au (ajax.che.curtin.edu.au [134.7.142.142]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id FAA20465 for ; Sun, 9 Mar 1997 05:22:10 -0800 (PST) Received: (from gdr@localhost) by ajax.che.curtin.edu.au (8.6.8/8.6.6) id XAA07975; Sun, 9 Mar 1997 23:20:00 +1000 From: Gary Roberts Message-Id: <199703091320.XAA07975@ajax.che.curtin.edu.au> Subject: Re: expr failure To: un_x@hotmail.com (steve howe) Date: Sun, 9 Mar 1997 23:19:59 +1000 (EST) Cc: hackers@freebsd.org In-Reply-To: <199703091226.EAA16596@f16.hotmail.com> from "steve howe" at Mar 9, 97 04:26:58 am Organisation: The University of Queensland Phone: +617 3844 0400 Reply-To: gdr@wcs.uq.edu.au X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk steve howe writes: > "/bin/expr" seems to be non-funtional. Works fine for me if you write the script properly. > !#/bin/sh ^^ #!/bin/sh > a=0; a='expr $a + 1' # right out of man page for expr ^ ^ Are you sure that's not supposed to be a=`expr $a + 1` Go read the man page again -- a bit more carefully. With those two corrections output is `val is 1' on several flavours of FreeBSD (from 1.1.5.1 to 2.2). I presume you did want `a' to be 1? > case $a in > 0) echo val is 0;; > 1) echo val is 1;; > esac > 2.1.5 - does this work for anyone? > i'm not sure if bugs are to be considered a "fluke" > or if they are considered a "normal" thing in this stage of FBSD > development. please respond to sender in addition to maillist. You should really examine your code a bit more carefully before casting such slurs on the developers. Knowing how hard they work, I'm sure they would find your comments rather offensive. Cheers, -- Gary Roberts (gdr@wcs.uq.edu.au) (Ph +617 3844 0400 Fax +617 3844 0444) 4th Floor, South Bank House, 234 Grey St, South Bank QLD 4101 Australia.