From owner-freebsd-stable@FreeBSD.ORG Fri Sep 21 17:23:37 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4606A106566C for ; Fri, 21 Sep 2012 17:23:37 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1C6A38FC0C for ; Fri, 21 Sep 2012 17:23:36 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id q8LHNaIS029517; Fri, 21 Sep 2012 10:23:36 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id q8LHNat1029516; Fri, 21 Sep 2012 10:23:36 -0700 (PDT) (envelope-from david) Date: Fri, 21 Sep 2012 10:23:36 -0700 From: David Wolfskill To: Brandon Allbery Message-ID: <20120921172336.GE28959@albert.catwhisker.org> References: <20120921170902.GC28959@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VUDLurXRWRKrGuMn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: stable@freebsd.org Subject: Re: /bin/sh arithmetic doesn't seem to like leading 0 now X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 17:23:37 -0000 --VUDLurXRWRKrGuMn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 21, 2012 at 01:20:07PM -0400, Brandon Allbery wrote: > On Fri, Sep 21, 2012 at 1:09 PM, David Wolfskill wr= ote: >=20 > > $ echo $(( 09 + 0 )) > > >=20 > Unable to get to fbsd box now but suspicious mind wants to know what > happens with 07 in place of 09. As (I) expected, it's handled Just fine: $ uname -r 9.1-PRERELEASE $ echo $(( 07 + 0 )) 7 $=20 So yeah, this seems to be something involving treating leading 0 as indicating octal (and seriously disliking "9" in such a context). Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --VUDLurXRWRKrGuMn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBcopcACgkQmprOCmdXAD2EhQCfVgzHG9FuEbhqd3D8zdOEn3iI NMYAn1+9MLn56xTnbJ68kYaMLqZoDA2c =ZHvY -----END PGP SIGNATURE----- --VUDLurXRWRKrGuMn--