Anonymous user
Loops/While: Difference between revisions
add UNIX Shell
m (→{{header|Perl}}: migrate content from Loop Structures) |
(add UNIX Shell) |
||
Line 487:
set i [expr {$i / 2}]
}</lang>
=={{header|UNIX Shell}}==
{{works with|Bourne Again SHell}}
<lang bash>x=1024
while [[ $x -gt 0 ]]; do
echo $x
x=$(( $x/2 ))
done</lang>
=={{header|UnixPipes}}==
test $a -gt 0 && (expr $a / 2 >> p.res ; echo $a) || exit 0
done</lang>
=={{header|V}}==
dup puts
2 / >int
] while</lang>
=={{header|Vedit macro language}}==
|