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)