On Wed, Oct 14, 2009 at 8:11 PM, igor denisov <denisovigor1...@rambler.ru> wrote: > Hi there > > my version of ksh: > > $what /bin/ksh > > /bin/ksh > Copyright (c) 1989, 1993 > $OpenBSD: mknod.c,v 1.1 2005/10/06 06:39:36 otto Exp $ > PD KSH v5.2.14 99/07/13.2 > > I cannot figure out what is wrong with the following code > > #! /bin/ksh > for (( i=9; i>0; i-- )) > do echo "$i" > done > > output: > syntax error: '((' unexpected. > why?
try: #!/bin/ksh i=9 while [ $i -gt 0 ] ; do echo $i i=$((i-1)) done