help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Bug/limitation in 'time'


From: Chris Down
Subject: Re: [Help-bash] Bug/limitation in 'time'
Date: Mon, 18 Mar 2013 14:17:59 +0800

Please do not conflate (( and $((. They are totally separate.

On 18 Mar 2013 12:41, "Chris F.A. Johnson" <address@hidden> wrote:
On Sun, 17 Mar 2013, Bruce Dawson wrote:

Chris Down pointed that out. My loop now looks like this -- portable (I
believe) and fast:

BashCount() {
   for (( i = $1 ; i > 0 ; i-- )); do

  No, that is not portable.

  The only portable use of (( ... )) is $(( ... ))


--
   Chris F.A. Johnson, <http://cfajohnson.com/>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]