help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Updating global variable from recursing function.


From: Greg Wooledge
Subject: Re: [Help-bash] Updating global variable from recursing function.
Date: Mon, 2 Apr 2012 08:32:18 -0400
User-agent: Mutt/1.4.2.3i

On Sun, Apr 01, 2012 at 01:18:53AM +0200, Frans de Boer wrote:
>   iMDirNest=$((iMDirNest+1))
>   if [[ iMDirNest > iHiMDirNest ]]; then
>     let iHiMDirNest=$iMDirNest
>   fi

That part's wrong for sure.  You are performing a string comparison in
the [[ command, not an integer comparison.  It should be:

  if (( iMDirNest > iHiMDirNest )); then

I didn't look at the rest.



reply via email to

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