bug-bash
[Top][All Lists]
Advanced

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

Re: Bug/limitation in 'time'


From: William Park
Subject: Re: Bug/limitation in 'time'
Date: Sun, 17 Mar 2013 01:09:47 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Mar 16, 2013 at 10:15:50PM -0400, Chris F.A. Johnson wrote:
> On Sun, 17 Mar 2013, Chris Down wrote:
> >   ExprCount() {
> >       for (( i = $1 ; i > 0 ; i-- )); do
> >           :
> >       done
> >       echo "$1 iterations"
> >   }
> 
>    Or, in a POSIX-compliant manner:
> 
> ExprCount() {
>   i=$1
>   while [ $(( i -= 1 )) -ge 0 ]; do
>     :
>   done
>   echo Just did $1 iterations using expr math
> }

Are you saying that

    for (( ; ; ))

is not POSIX?
-- 
William



reply via email to

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