BREAK(1SH) COMMAND REFERENCE BREAK(1SH) NAME break - exit from a for or while loop (sh built-in) SYNOPSIS break [ n ] DESCRIPTION Break exits from the enclosing for or while loop. If n is specified, break n levels. EXAMPLES The following shell script reads lines from the standard input. If the first word is "end", the rest of the line is printed and the shell script terminates. The loop is left by using break. #!/bin/sh while read f g do if test "$f" = "end" then break fi done echo $g RETURN VALUE [NO_ERRS] Command completed without error. SEE ALSO break(1csh), cd(1sh), continue(1sh), csh(1csh), echo(1sh), eval(1sh), exec(1sh), exit(1sh), export(1sh), hash(1sh), login(1), pwd(1sh), read(1sh), readonly(1sh), return(1sh), set(1sh), sh(1sh), shift(1sh), test(1sh), times(1sh), trap(1sh), type(1sh), ulimit(1sh), umask(1sh), unset(1sh), wait(1sh), and execve(2). Printed 5/12/88 1
%%index%% na:312,187; sy:499,159; de:658,353; ex:1011,553; rv:1564,177; se:1741,843; %%index%%000000000108