Loops/For: Difference between revisions

Content added Content deleted
(Add LDPL)
m (→‎ksh: fix category)
Line 3,806: Line 3,806:
end</syntaxhighlight>
end</syntaxhighlight>


==={{header|Korn Shell}}===
==={{header|ksh}}===
{{works with|Korn Shell 93}}
{{works with|ksh93}}
<syntaxhighlight lang="bash">for ((x=1; x<=5; x=x+1)); do
<syntaxhighlight lang="ksh">for ((x = 1; x <= 5; x += 1))
do
for ((y=1; y<=x; y=y+1)); do
for ((y = 0; y < x; y += 1))
echo -n '*'
do
done
print -n '*'
echo ""
done
done </syntaxhighlight>
print
done</syntaxhighlight>


=={{header|UnixPipes}}==
=={{header|UnixPipes}}==