builtin.1 revision 57714

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: head/share/man/man1/builtin.1 57714 2000-03-03 09:28:05Z sheldonh $

.Dd September 1, 1999 .Dt BUILTIN 1 .Os .Sh NAME .Nm builtin , .Nm alias , .Nm alloc , .Nm bg , .Nm break , .Nm breaksw , .Nm case , .Nm cd , .Nm chdir , .Nm command , .Nm continue , .Nm cwd , .Nm default , .Nm dirs , .Nm do , .Nm done , .Nm echo , .Nm elif , .Nm else , .Nm end , .Nm endif , .Nm endsw , .Nm esac , .Nm eval , .Nm exec , .Nm exit , .Nm export , .Nm fc , .Nm fg , .Nm fi , .Nm for , .Nm foreach , .Nm getopts , .Nm glob , .Nm goto , .Nm hash , .Nm hashstat , .Nm history , .Nm if , .Nm jobid , .Nm jobs , .Nm kill , .Nm limit , .Nm login , .Nm logout , .Nm nice , .Nm nohup , .Nm notify , .Nm onintr , .Nm popd , .Nm printf , .Nm pushd , .Nm pwd , .Nm read , .Nm readonly , .Nm rehash , .Nm repeat , .Nm set , .Nm setenv , .Nm setvar , .Nm shift , .Nm source , .Nm stop , .Nm suspend , .Nm switch , .Nm then , .Nm time , .Nm trap , .Nm type , .Nm ulimit , .Nm umask , .Nm unalias , .Nm unhash , .Nm unlimit , .Nm unset , .Nm unsetenv , .Nm until , .Nm wait , .Nm which , .Nm while .Nd shell builtin commands .Sh SYNOPSIS .Nm builtin .Op Fl options .Op Ar args ... .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.

p If a command specified to the shell contains a slash .Dq / , 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 Ic echo causes a builtin command to be executed under shells that support the builtin echo command, specifying .Dq Pa /bin/echo or .Dq Pa ./echo does not.

p 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.

p Only builtin commands for the .Xr csh 1 and .Xr sh 1 shells are listed here. Consult the appropriate manual page for details on the operation of any given builtin command under those shells. Users of other shells will need to consult the documentation supplied with the other shells. l -column "continueXX" "ExternalXX" "csh(1)" "sh(1)" -offset indent
XXX:
The correct table header here can not be rendered with mdoc's current
argument maximum. When mdoc can handle sufficient arguments, the
correct table header will be as follows:
.It Em Command Ta Em External Ta Xr csh 1 Ta Xr sh 1

t Em Command External csh sh t Ic alias Ta No Ta Yes Ta Yes t Ic alloc Ta No Ta Yes Ta No t Ic bg Ta No Ta Yes Ta Yes t Ic break Ta No Ta Yes Ta No t Ic breaksw Ta No Ta Yes Ta No t Ic case Ta No Ta Yes Ta Yes t Ic cd Ta No Ta Yes Ta Yes t Ic chdir Ta No Ta Yes Ta No t Ic command Ta No Ta No Ta Yes t Ic continue Ta No Ta Yes Ta No t Ic cwd Ta No Ta Yes Ta No t Ic default Ta No Ta Yes Ta No t Ic dirs Ta No Ta Yes Ta No t Ic do Ta No Ta No Ta Yes t Ic done Ta No Ta No Ta Yes t Ic echo Ta Yes Ta Yes Ta Yes t Ic elif Ta No Ta No Ta Yes t Ic else Ta No Ta Yes Ta No t Ic end Ta No Ta Yes Ta No t Ic endif Ta No Ta Yes Ta No t Ic endsw Ta No Ta Yes Ta No t Ic esac Ta No Ta No Ta Yes t Ic eval Ta No Ta Yes Ta Yes t Ic exec Ta No Ta Yes Ta Yes t Ic exit Ta No Ta Yes Ta Yes t Ic export Ta No Ta No Ta Yes t Ic fc Ta No Ta No Ta Yes t Ic fg Ta No Ta Yes Ta Yes t Ic fi Ta No Ta No Ta Yes t Ic for Ta No Ta No Ta Yes t Ic foreach Ta No Ta Yes Ta No t Ic getopts Ta No Ta No Ta Yes t Ic glob Ta No Ta Yes Ta No t Ic goto Ta No Ta Yes Ta No t Ic hash Ta No Ta No Ta Yes t Ic hashstat Ta No Ta Yes Ta No t Ic history Ta No Ta Yes Ta No t Ic if Ta No Ta Yes Ta No t Ic jobid Ta No Ta No Ta Yes t Ic jobs Ta No Ta Yes Ta Yes t Ic kill Ta Yes Ta Yes Ta No t Ic limit Ta No Ta Yes Ta No t Ic login Ta Yes Ta Yes Ta No t Ic logout Ta No Ta Yes Ta No t Ic nice Ta Yes Ta Yes Ta No t Ic nohup Ta Yes Ta Yes Ta No t Ic notify Ta No Ta Yes Ta No t Ic onintr Ta No Ta Yes Ta No t Ic popd Ta No Ta Yes Ta No t Ic printf Ta Yes Ta Yes Ta Yes t Ic pushd Ta No Ta Yes Ta No t Ic pwd Ta Yes Ta No Ta Yes t Ic read Ta No Ta No Ta Yes t Ic readonly Ta No Ta No Ta Yes t Ic rehash Ta No Ta Yes Ta No t Ic repeat Ta No Ta Yes Ta No t Ic set Ta No Ta Yes Ta Yes t Ic setenv Ta No Ta Yes Ta No t Ic setvar Ta No Ta No Ta Yes t Ic shift Ta No Ta Yes Ta Yes t Ic source Ta No Ta Yes Ta No t Ic stop Ta No Ta Yes Ta No t Ic suspend Ta No Ta Yes Ta No t Ic switch Ta No Ta Yes Ta No t Ic then Ta No Ta No Ta Yes t Ic time Ta Yes Ta Yes Ta No t Ic trap Ta No Ta No Ta Yes t Ic type Ta No Ta No Ta Yes t Ic ulimit Ta No Ta No Ta Yes t Ic umask Ta No Ta Yes Ta Yes t Ic unalias Ta No Ta Yes Ta Yes t Ic unhash Ta No Ta Yes Ta No t Ic unlimit Ta No Ta Yes Ta No t Ic unset Ta No Ta Yes Ta Yes t Ic unsetenv Ta No Ta Yes Ta No t Ic until Ta No Ta No Ta Yes t Ic wait Ta No Ta Yes Ta Yes t Ic which Ta Yes Ta Yes Ta No t Ic while Ta No Ta Yes Ta No .El .Sh SEE ALSO .Xr csh 1 , .Xr echo 1 , .Xr kill 1 , .Xr login 1 , .Xr nice 1 , .Xr nohup 1 , .Xr printf 1 , .Xr pwd 1 , .Xr sh 1 , .Xr time 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 .