1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
.\"
.\" Copyright (c) 1999 Sheldon Hearn
.\"
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd October 14, 2006
.Dt BUILTIN 1
.Os
.Sh NAME
.Nm builtin ,
.Nm \&! ,
.Nm % ,
.Nm \&. ,
.Nm \&: ,
.Nm @ ,
.Nm { ,
.Nm } ,
.Nm alias ,
.Nm alloc ,
.Nm bg ,
.Nm bind ,
.Nm bindkey ,
.Nm break ,
.Nm breaksw ,
.Nm builtins ,
.Nm case ,
.Nm cd ,
.Nm chdir ,
.Nm command ,
.Nm complete ,
.Nm continue ,
.Nm default ,
.Nm dirs ,
.Nm do ,
.Nm done ,
.Nm echo ,
.Nm echotc ,
.Nm elif ,
.Nm else ,
.Nm end ,
.Nm endif ,
.Nm endsw ,
.Nm esac ,
.Nm eval ,
.Nm exec ,
.Nm exit ,
.Nm export ,
.Nm false ,
.Nm fc ,
.Nm fg ,
.Nm filetest ,
.Nm fi ,
.Nm for ,
.Nm foreach ,
.Nm getopts ,
.Nm glob ,
.Nm goto ,
.Nm hash ,
.Nm hashstat ,
.Nm history ,
.Nm hup ,
.Nm if ,
.Nm jobid ,
.Nm jobs ,
.Nm kill ,
.Nm limit ,
.Nm local ,
.Nm log ,
.Nm login ,
.Nm logout ,
.Nm ls-F ,
.Nm nice ,
.Nm nohup ,
.Nm notify ,
.Nm onintr ,
.Nm popd ,
.Nm printenv ,
.Nm pushd ,
.Nm pwd ,
.Nm read ,
.Nm readonly ,
.Nm rehash ,
.Nm repeat ,
.Nm return ,
.Nm sched ,
.Nm set ,
.Nm setenv ,
.Nm settc ,
.Nm setty ,
.Nm setvar ,
.Nm shift ,
.Nm source ,
.Nm stop ,
.Nm suspend ,
.Nm switch ,
.Nm telltc ,
.Nm test ,
.Nm then ,
.Nm time ,
.Nm times ,
.Nm trap ,
.Nm true ,
.Nm type ,
.Nm ulimit ,
.Nm umask ,
.Nm unalias ,
.Nm uncomplete ,
.Nm unhash ,
.Nm unlimit ,
.Nm unset ,
.Nm unsetenv ,
.Nm until ,
.Nm wait ,
.Nm where ,
.Nm which ,
.Nm while
.Nd shell built-in commands
.Sh SYNOPSIS
See the built-in command description in the appropriate shell manual page.
.Sh DESCRIPTION
Shell builtin commands are commands that can be executed within the
running shell's process.
Note that, in the case of
.Xr csh 1
builtin commands, the command is executed in a subshell if it occurs as
any component of a pipeline except the last.
.Pp
If a command specified to the shell contains a slash
.Ql / ,
the shell will not execute a builtin command, even if the last component
of the specified command matches the name of a builtin command.
Thus, while specifying
.Dq Li echo
causes a builtin command to be executed under shells that support the
.Nm echo
builtin command,
specifying
.Dq Li /bin/echo
or
.Dq Li ./echo
does not.
.Pp
While some builtin commands may exist in more than one shell, their
operation may be different under each shell which supports them.
Below is a table which lists shell builtin commands, the standard shells
that support them and whether they exist as standalone utilities.
.Pp
Only builtin commands for the
.Xr csh 1
and
.Xr sh 1
shells are listed here.
Consult a shell's manual page for
details on the operation its builtin commands.
Beware that the
.Xr sh 1
manual page, at least, calls some of these commands
.Dq built-in commands
and some of them
.Dq reserved words .
Users of other shells may need to consult an
.Xr info 1
page or other sources of documentation.
.Pp
Commands marked
.Dq Li No**
under
.Em External
do exist externally,
but are implemented as scripts using a builtin command of the same name.
.Bl -column ".Ic uncomplete" ".Em External" ".Xr csh 1" ".Xr sh 1" -offset indent
.It Xo
.Em "Command External" Ta Xr csh 1 Ta Xr sh 1
.Xc
.It Ic ! Ta \&No Ta \&No Ta Yes
.It Ic % Ta \&No Ta Yes Ta \&No
.It Ic . Ta \&No Ta \&No Ta Yes
.It Ic : Ta \&No Ta Yes Ta Yes
.It Ic @ Ta \&No Ta Yes Ta Yes
.It Ic { Ta \&No Ta \&No Ta Yes
.It Ic } Ta \&No Ta \&No Ta Yes
.It Ic alias Ta No** Ta Yes Ta Yes
.It Ic alloc Ta \&No Ta Yes Ta \&No
.It Ic bg Ta No** Ta Yes Ta Yes
.It Ic bind Ta \&No Ta \&No Ta Yes
.It Ic bindkey Ta \&No Ta Yes Ta \&No
.It Ic break Ta \&No Ta Yes Ta Yes
.It Ic breaksw Ta \&No Ta Yes Ta \&No
.It Ic builtin Ta \&No Ta \&No Ta Yes
.It Ic builtins Ta \&No Ta Yes Ta \&No
.It Ic case Ta \&No Ta Yes Ta Yes
.It Ic cd Ta No** Ta Yes Ta Yes
.It Ic chdir Ta \&No Ta Yes Ta Yes
.It Ic command Ta No** Ta \&No Ta Yes
.It Ic complete Ta \&No Ta Yes Ta \&No
.It Ic continue Ta \&No Ta Yes Ta Yes
.It Ic default Ta \&No Ta Yes Ta \&No
.It Ic dirs Ta \&No Ta Yes Ta \&No
.It Ic do Ta \&No Ta \&No Ta Yes
.It Ic done Ta \&No Ta \&No Ta Yes
.It Ic echo Ta Yes Ta Yes Ta Yes
.It Ic echotc Ta \&No Ta Yes Ta \&No
.It Ic elif Ta \&No Ta \&No Ta Yes
.It Ic else Ta \&No Ta Yes Ta Yes
.It Ic end Ta \&No Ta Yes Ta \&No
.It Ic endif Ta \&No Ta Yes Ta \&No
.It Ic endsw Ta \&No Ta Yes Ta \&No
.It Ic esac Ta \&No Ta \&No Ta Yes
.It Ic eval Ta \&No Ta Yes Ta Yes
.It Ic exec Ta \&No Ta Yes Ta Yes
.It Ic exit Ta \&No Ta Yes Ta Yes
.It Ic export Ta \&No Ta \&No Ta Yes
.It Ic false Ta Yes Ta \&No Ta Yes
.It Ic fc Ta No** Ta \&No Ta Yes
.It Ic fg Ta No** Ta Yes Ta Yes
.It Ic filetest Ta \&No Ta Yes Ta \&No
.It Ic fi Ta \&No Ta \&No Ta Yes
.It Ic for Ta \&No Ta \&No Ta Yes
.It Ic foreach Ta \&No Ta Yes Ta \&No
.It Ic getopts Ta No** Ta \&No Ta Yes
.It Ic glob Ta \&No Ta Yes Ta \&No
.It Ic goto Ta \&No Ta Yes Ta \&No
.It Ic hash Ta \&No Ta \&No Ta Yes
.It Ic hashstat Ta \&No Ta Yes Ta \&No
.It Ic history Ta \&No Ta Yes Ta \&No
.It Ic hup Ta \&No Ta Yes Ta \&No
.It Ic if Ta \&No Ta Yes Ta Yes
.It Ic jobid Ta \&No Ta \&No Ta Yes
.It Ic jobs Ta No** Ta Yes Ta Yes
.It Ic kill Ta Yes Ta Yes Ta \&No
.It Ic limit Ta \&No Ta Yes Ta \&No
.It Ic local Ta \&No Ta \&No Ta Yes
.It Ic log Ta \&No Ta Yes Ta \&No
.It Ic login Ta Yes Ta Yes Ta \&No
.It Ic logout Ta \&No Ta Yes Ta \&No
.It Ic ls-F Ta \&No Ta Yes Ta \&No
.It Ic nice Ta Yes Ta Yes Ta \&No
.It Ic nohup Ta Yes Ta Yes Ta \&No
.It Ic notify Ta \&No Ta Yes Ta \&No
.It Ic onintr Ta \&No Ta Yes Ta \&No
.It Ic popd Ta \&No Ta Yes Ta \&No
.It Ic printenv Ta Yes Ta Yes Ta \&No
.It Ic pushd Ta \&No Ta Yes Ta \&No
.It Ic pwd Ta Yes Ta \&No Ta Yes
.It Ic read Ta No** Ta \&No Ta Yes
.It Ic readonly Ta \&No Ta \&No Ta Yes
.It Ic rehash Ta \&No Ta Yes Ta \&No
.It Ic repeat Ta \&No Ta Yes Ta \&No
.It Ic return Ta \&No Ta \&No Ta Yes
.It Ic sched Ta \&No Ta Yes Ta \&No
.It Ic set Ta \&No Ta Yes Ta Yes
.It Ic setenv Ta \&No Ta Yes Ta \&No
.It Ic settc Ta \&No Ta Yes Ta \&No
.It Ic setty Ta \&No Ta Yes Ta \&No
.It Ic setvar Ta \&No Ta \&No Ta Yes
.It Ic shift Ta \&No Ta Yes Ta Yes
.It Ic source Ta \&No Ta Yes Ta \&No
.It Ic stop Ta \&No Ta Yes Ta \&No
.It Ic suspend Ta \&No Ta Yes Ta \&No
.It Ic switch Ta \&No Ta Yes Ta \&No
.It Ic telltc Ta \&No Ta Yes Ta \&No
.It Ic test Ta Yes Ta \&No Ta Yes
.It Ic then Ta \&No Ta \&No Ta Yes
.It Ic time Ta Yes Ta Yes Ta \&No
.It Ic times Ta \&No Ta \&No Ta Yes
.It Ic trap Ta \&No Ta \&No Ta Yes
.It Ic true Ta Yes Ta \&No Ta Yes
.It Ic type Ta \&No Ta \&No Ta Yes
.It Ic ulimit Ta \&No Ta \&No Ta Yes
.It Ic umask Ta No** Ta Yes Ta Yes
.It Ic unalias Ta No** Ta Yes Ta Yes
.It Ic uncomplete Ta \&No Ta Yes Ta \&No
.It Ic unhash Ta \&No Ta Yes Ta \&No
.It Ic unlimit Ta \&No Ta Yes Ta \&No
.It Ic unset Ta \&No Ta Yes Ta Yes
.It Ic unsetenv Ta \&No Ta Yes Ta \&No
.It Ic until Ta \&No Ta \&No Ta Yes
.It Ic wait Ta No** Ta Yes Ta Yes
.It Ic where Ta \&No Ta Yes Ta \&No
.It Ic which Ta Yes Ta Yes Ta \&No
.It Ic while Ta \&No Ta Yes Ta Yes
.El
.Sh SEE ALSO
.Xr csh 1 ,
.Xr echo 1 ,
.Xr false 1 ,
.Xr info 1 ,
.Xr kill 1 ,
.Xr login 1 ,
.Xr nice 1 ,
.Xr nohup 1 ,
.Xr printenv 1 ,
.Xr pwd 1 ,
.Xr sh 1 ,
.Xr test 1 ,
.Xr time 1 ,
.Xr true 1 ,
.Xr which 1
.Sh HISTORY
The
.Nm
manual page first appeared in
.Fx 3.4 .
.Sh AUTHORS
This manual page was written by
.An Sheldon Hearn Aq sheldonh@FreeBSD.org .
|