Date: Sun, 09 Mar 1997 21:26:23 +0000 From: Brian Somers <brian@awfulhak.demon.co.uk> To: steve howe <un_x@hotmail.com> Cc: hackers@freebsd.org Subject: Re: expr failure Message-ID: <199703092126.VAA04719@awfulhak.demon.co.uk> In-Reply-To: Your message of "Sun, 09 Mar 1997 04:26:58 PST." <199703091226.EAA16596@f16.hotmail.com>
index | next in thread | previous in thread | raw e-mail
> "/bin/expr" seems to be non-funtional.
> \
> !#/bin/sh
> #
> a=0; a='expr $a + 1' # right out of man page for expr
You'll need the right quotes (`), not ('), or use "let" for clarity:
a=0
let a=$a+1
Even using $() makes things clearer:
a=0
a=$(expr $a + 1)
and makes life easier when nesting.
--
Brian <brian@awfulhak.demon.co.uk>, <brian@freebsd.org>
<http://www.awfulhak.demon.co.uk/>
Don't _EVER_ lose your sense of humour....
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703092126.VAA04719>
