1break(1)                         User Commands                        break(1)
2
3
4

NAME

6       break,  continue  -  shell built-in functions to escape from or advance
7       within a controlling while, for, foreach, or until loop
8

SYNOPSIS

10   sh
11       break [n]
12
13
14       continue [n]
15
16
17   csh
18       break
19
20
21       continue
22
23
24   ksh
25       *break [n]
26
27
28       *continue [n]
29
30
31   ksh93
32       +break [n]
33
34
35       +continue [n]
36
37

DESCRIPTION

39   sh
40       The break utility exits from the enclosing for or while loop,  if  any.
41       If n is specified, break n levels.
42
43
44       The continue utility resumes the next iteration of the enclosing for or
45       while loop. If n is specified, resume at the n-th enclosing loop.
46
47   csh
48       The break utility resumes  execution  after  the  end  of  the  nearest
49       enclosing  foreach or while loop. The remaining commands on the current
50       line are executed. This allows multilevel breaks to  be  written  as  a
51       list of break commands, all on one line.
52
53
54       The  continue  utility continues execution of the next iteration of the
55       nearest enclosing while or foreach loop.
56
57   ksh
58       The break utility exits from the enclosed for, while, until, or  select
59       loop,  if  any. If n is specified, then break n levels. If n is greater
60       than the number of enclosing loops, the outermost enclosing loop  shall
61       be exited.
62
63
64       The  continue  utility  resumes the next iteration of the enclosed for,
65       while, until, or select loop. If n is specified then resume at the n-th
66       enclosed  loop. If n is greater than the number of enclosing loops, the
67       outermost enclosing loop shall be used.
68
69
70       On this manual page, ksh(1) commands that are preceded by one or two  *
71       (asterisks) are treated specially in the following ways:
72
73           1.     Variable  assignment  lists  preceding the command remain in
74                  effect when the command completes.
75
76           2.     I/O redirections are processed after variable assignments.
77
78           3.     Errors cause a script that contains them to abort.
79
80           4.     Words that follow a command preceded by ** that are  in  the
81                  format  of  a variable assignment are expanded with the same
82                  rules as a variable assignment. This means that  tilde  sub‐
83                  stitution  is performed after the = sign, and also that word
84                  splitting and file name generation are not performed.
85
86   ksh93
87       break is a shell special built-in that  exits  the  smallest  enclosing
88       for, select, while, or until loop. It also exits the nth enclosing loop
89       if n is specified. Execution continues at  the  command  following  the
90       loop or loops.
91
92
93       If  n  is  specified,  it must be a positive integer ≥1. If n is larger
94       than the number of enclosing loops, the last enclosing loop is exited.
95
96
97       continue is a shell special built-in that continues  execution  at  the
98       top  of  the  smallest  enclosing for, select, while, or until loop, if
99       any; or of the top of the nth enclosing loop if n is specified.
100
101
102       If n is specified, it must be a positive integer ≥1.  If  n  is  larger
103       than the number of enclosing loops, the last enclosing loop is used.
104
105
106       On  this manual page, ksh93(1) commands that are preceded by one or two
107       + symbols are special built-in commands and are treated  the  following
108       ways:
109
110           1.     Variable  assignment  lists  preceding the command remain in
111                  effect when the command completes.
112
113           2.     I/O redirections are processed after variable assignments.
114
115           3.     Errors cause a script that contains them to abort.
116
117           4.     Built-in commands are not valid function names.
118
119           5.     Words following a command preceded by ++  that  are  in  the
120                  format of a variable assignment are expanded with rules as a
121                  variable assignment. This means that tilde  substitution  is
122                  performed after the = sign and field splitting and file name
123                  generation are not performed.
124

ATTRIBUTES

126       See attributes(5) for descriptions of the following attributes:
127
128
129
130
131       ┌─────────────────────────────┬─────────────────────────────┐
132       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
133       ├─────────────────────────────┼─────────────────────────────┤
134       │Availability                 │SUNWcsu                      │
135       └─────────────────────────────┴─────────────────────────────┘
136

SEE ALSO

138       csh(1), exit(1), ksh(1), ksh93(1), sh(1), attributes(5)
139
140
141
142SunOS 5.11                        8 Apr 2008                          break(1)
Impressum