From owner-freebsd-stable@FreeBSD.ORG Fri Sep 21 17:58:02 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2E32106566B for ; Fri, 21 Sep 2012 17:58:02 +0000 (UTC) (envelope-from daryl@isletech.net) Received: from mail.isletech.net (mail.isletech.net [216.254.158.138]) by mx1.freebsd.org (Postfix) with ESMTP id 7190D8FC08 for ; Fri, 21 Sep 2012 17:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=isletech.net; s=isle; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=AupmWRnZ7YoIuOqkv5kOoJVk0DXogv9cTAcDt1EEiO4=; b=pmKpbpEwW4JM3ecB0ywwnhU7K/eF9X/uGytjf3r9H3Pvg02a67aH/7+CUyt2pgBZaBnsbY4Vy8yx7Mjsh41bDg==; Message-ID: <505CA330.3050206@isletech.net> Date: Fri, 21 Sep 2012 13:26:08 -0400 From: Daryl Richards User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <20120921170902.GC28959@albert.catwhisker.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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:58:02 -0000 On 21/09/2012 1:20 PM, Brandon Allbery wrote: > On Fri, Sep 21, 2012 at 1:09 PM, David Wolfskill wrote: > >> $ echo $(( 09 + 0 )) >> > Unable to get to fbsd box now but suspicious mind wants to know what > happens with 07 in place of 09. > Interestingly enough, bash gives a proper explanation: bash$ echo $(( 09 + 0 )) -bash: 09: value too great for base (error token is "09") bash$ echo $(( 07 + 0 )) 7 -- Daryl Richards Isle Technical Services Inc (519) 573-3399