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