Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: counting in "for" loops



On Wed, Dec 02, 1998 at 05:00:32PM +0100, Sven Guckes wrote:
> Again, I look at the manual and  I cannot find
> how to do a simple count within a for loop.
> 
> 	$ for count in ???; do
> 	> echo -n $count
> 	> done
> 	1 2 3 4 5 6 7 8 9 10
> 
> What do I need for "???"?
> Why isn't this in the manual as an example?  *sigh*

for i in {1..10} ; do echo -n "$i " ; done

> Sven

HTH,
Thomas

P.S.: Documentation could be better organized ;-)

-- 
    Thomas Köhler    Email:     jean-luc@xxxxxxxxxxxxxxxxx
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships



Messages sorted by: Reverse Date, Date, Thread, Author