Wiki source for CommandBreak


Show raw source

======Command break======


====Name====
**break** exits a for or while loop

====Synopsis====

break [levels]


====Description====

The break statement exits one or more levels of a while, for or until.
If no arguments are supplied then 1 level is exited.


====Examples====

%%
for i in a b c d e ; do
echo $i
if [ $i = "b" ] ; then
break ;
fi
done
%%

Results
%%
a
b
%%


----
[[Commands]]
[[CategoryCommands]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki