[clug] Rosetta code: bash/bourne shell 'loops' example

steve jenkin sjenkin at canb.auug.org.au
Sat Mar 20 22:44:46 MDT 2010


I didn't follow their instructions :-(
In this context, the solutions aren't that clumsy...

"For this task, show how two loops may be nested within each other, with
the number of iterations performed by the inner for loop being
controlled by the outer for loop. Specifically print out the following
pattern by using one for loop nested in another:"

steve jenkin wrote on 21/03/10 3:35 PM:
> Anyone care to comment or offer some more solutions?
> (including your favourite shell)
> 
> I found their nested 'for loop' examples awkward...
> 
> cheers
> steve
> 
> ----------------------------
> The 'loops' language comparison.
> Print this (i.e. for n=5)
> 
> *
> **
> ***
> ****
> *****


More information about the linux mailing list