Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Mar 1997 23:19:59 +1000 (EST)
From:      Gary Roberts <gdr@ajax.che.curtin.edu.au>
To:        un_x@hotmail.com (steve howe)
Cc:        hackers@freebsd.org
Subject:   Re: expr failure
Message-ID:  <199703091320.XAA07975@ajax.che.curtin.edu.au>
In-Reply-To: <199703091226.EAA16596@f16.hotmail.com> from "steve  howe" at Mar 9, 97 04:26:58 am

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703091320.XAA07975>