Date: Sun, 06 Jun 2010 08:09:22 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Dan Nelson <dnelson@allantgroup.com> Cc: Brandon Gooch <jamesbrandongooch@gmail.com>, Aiza <aiza21@comclark.com>, "questions@freebsd.org" <questions@freebsd.org>, Robert Bonomi <bonomi@mail.r-bonomi.com> Subject: Re: .sh & getopts Message-ID: <4C0B49A2.1000009@infracaninophile.co.uk> In-Reply-To: <20100606014737.GG85961@dan.emsphone.com> References: <201006051513.o55FDCKj020952@mail.r-bonomi.com> <4C0ADBCF.8040506@comclark.com> <AANLkTimDVOQE-SrT7YO4UD3tktD81jy8px6dbbB83-Dl@mail.gmail.com> <20100606014737.GG85961@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/06/2010 02:47:38, Dan Nelson wrote: >> flag_count=`expr $flag_count + 1` > /bin/sh can do math on its own: > > flag_count=$((flag_count+1)) flag_count=$(( $flag_count + 1 )) surely? Needs to dereference the variable inside the arithmetic expansion. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwLSaIACgkQ8Mjk52CukIzQvQCfUnjDCkQ1Xk18MiENPTBhEKlA PIgAnivZn/n+vJVXYFZnpOcrJ0/6voQV =kZtj -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C0B49A2.1000009>