bug-bash
[Top][All Lists]
Advanced

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

RE: Bug/limitation in 'time'


From: Chris F.A. Johnson
Subject: RE: Bug/limitation in 'time'
Date: Mon, 18 Mar 2013 00:44:06 -0400 (EDT)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

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]