On 15 October 2009 c. 07:33:36 patrick keshishian wrote: > 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
Or: for i in `jot 10 9 0 -1`; do echo $i done -- Best wishes, Vadim Zhukov A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?