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$ 28.\" 29.Dd September 1, 1999 30.Dt BUILTIN 1 31.Os 32.Sh NAME 33.Nm builtin , 34.Nm alias , 35.Nm alloc , 36.Nm bg , 37.Nm break , 38.Nm breaksw , 39.Nm case , 40.Nm cd , 41.Nm chdir , 42.Nm command , 43.Nm continue , 44.Nm cwd , 45.Nm default , 46.Nm dirs , 47.Nm do , 48.Nm done , 49.Nm echo , 50.Nm elif , 51.Nm else , 52.Nm end , 53.Nm endif , 54.Nm endsw , 55.Nm esac , 56.Nm eval , 57.Nm exec , 58.Nm exit , 59.Nm export , 60.Nm fc , 61.Nm fg , 62.Nm fi , 63.Nm for , 64.Nm foreach , 65.Nm getopts , 66.Nm glob , 67.Nm goto , 68.Nm hash , 69.Nm hashstat , 70.Nm history , 71.Nm if , 72.Nm jobid , 73.Nm jobs , 74.Nm kill , 75.Nm limit , 76.Nm login , 77.Nm logout , 78.Nm nice , 79.Nm nohup , 80.Nm notify , 81.Nm onintr , 82.Nm popd , 83.Nm printf , 84.Nm pushd , 85.Nm pwd , 86.Nm readonly , 87.Nm rehash , 88.Nm repeat , 89.Nm set , 90.Nm setenv , 91.Nm setvar , 92.Nm shift , 93.Nm source , 94.Nm stop , 95.Nm suspend , 96.Nm switch , 97.Nm then , 98.Nm time , 99.Nm trap , 100.Nm type , 101.Nm ulimit , 102.Nm umask , 103.Nm unalias , 104.Nm unhash , 105.Nm unlimit , 106.Nm unset , 107.Nm unsetenv , 108.Nm until , 109.Nm wait , 110.Nm which , 111.Nm while 112.Nd shell builtin commands 113.Sh SYNOPSIS 114.Nm builtin 115.Op Fl options 116.Op Ar args ... 117.Sh DESCRIPTION 118Shell builtin commands are commands that can be executed within the 119running shell's process. 120Note that, in the case of 121.Xr csh 1 122builtin commands, the command is executed in a subshell if it occurs as 123any component of a pipeline except the last. 124.Pp 125If a command specified to the shell contains a slash 126.Dq \&/ , 127the shell will not execute a builtin command, even if the last component 128of the specified command matches the name of a builtin command. 129Thus, while specifying 130.Dq Ic echo 131causes a builtin command to be executed under shells that support the 132builtin echo command, 133specifying 134.Dq Pa /bin/echo 135or 136.Dq Pa ./echo 137does not. 138.Pp 139While some builtin commands may exist in more than one shell, their 140operation may be different under each shell which supports them. 141Below is a table which lists shell builtin commands, the standard shells 142that support them and whether they exist as standalone utilities. 143.Pp 144Only builtin commands for the 145.Xr csh 1 146and 147.Xr sh 1 148shells are listed here. 149Consult the appropriate manual page for 150details on the operation of any given builtin command under those shells. 151Users of other shells will need to consult the documentation supplied 152with the other shells. 153.Bl -column "continueXX" "ExternalXX" "csh(1)" "sh(1)" -offset indent 154.\" 155.\" XXX: 156.\" The correct table header here can not be rendered with mdoc's current 157.\" argument maximum. When mdoc can handle sufficient arguments, the 158.\" correct table header will be as follows: 159.\" .It Em Command Ta Em External Ta Xr csh 1 Ta Xr sh 1 160.\" 161.It Em Command External csh sh 162.It Ic alias Ta \&No Ta Yes Ta Yes 163.It Ic alloc Ta \&No Ta Yes Ta \&No 164.It Ic bg Ta \&No Ta Yes Ta Yes 165.It Ic break Ta \&No Ta Yes Ta \&No 166.It Ic breaksw Ta \&No Ta Yes Ta \&No 167.It Ic case Ta \&No Ta Yes Ta Yes 168.It Ic cd Ta \&No Ta Yes Ta Yes 169.It Ic chdir Ta \&No Ta Yes Ta \&No 170.It Ic command Ta \&No Ta \&No Ta Yes 171.It Ic continue Ta \&No Ta Yes Ta \&No 172.It Ic cwd Ta \&No Ta Yes Ta \&No 173.It Ic default Ta \&No Ta Yes Ta \&No 174.It Ic dirs Ta \&No Ta Yes Ta \&No 175.It Ic do Ta \&No Ta \&No Ta Yes 176.It Ic done Ta \&No Ta \&No Ta Yes 177.It Ic echo Ta Yes Ta Yes Ta Yes 178.It Ic elif Ta \&No Ta \&No Ta Yes 179.It Ic else Ta \&No Ta Yes Ta \&No 180.It Ic end Ta \&No Ta Yes Ta \&No 181.It Ic endif Ta \&No Ta Yes Ta \&No 182.It Ic endsw Ta \&No Ta Yes Ta \&No 183.It Ic esac Ta \&No Ta \&No Ta Yes 184.It Ic eval Ta \&No Ta Yes Ta Yes 185.It Ic exec Ta \&No Ta Yes Ta Yes 186.It Ic exit Ta \&No Ta Yes Ta Yes 187.It Ic export Ta \&No Ta \&No Ta Yes 188.It Ic fc Ta \&No Ta \&No Ta Yes 189.It Ic fg Ta \&No Ta Yes Ta Yes 190.It Ic fi Ta \&No Ta \&No Ta Yes 191.It Ic for Ta \&No Ta \&No Ta Yes 192.It Ic foreach Ta \&No Ta Yes Ta \&No 193.It Ic getopts Ta \&No Ta \&No Ta Yes 194.It Ic glob Ta \&No Ta Yes Ta \&No 195.It Ic goto Ta \&No Ta Yes Ta \&No 196.It Ic hash Ta \&No Ta \&No Ta Yes 197.It Ic hashstat Ta \&No Ta Yes Ta \&No 198.It Ic history Ta \&No Ta Yes Ta \&No 199.It Ic if Ta \&No Ta Yes Ta \&No 200.It Ic jobid Ta \&No Ta \&No Ta Yes 201.It Ic jobs Ta \&No Ta Yes Ta Yes 202.It Ic kill Ta Yes Ta Yes Ta \&No 203.It Ic limit Ta \&No Ta Yes Ta \&No 204.It Ic login Ta Yes Ta Yes Ta \&No 205.It Ic logout Ta \&No Ta Yes Ta \&No 206.It Ic nice Ta Yes Ta Yes Ta \&No 207.It Ic nohup Ta Yes Ta Yes Ta \&No 208.It Ic notify Ta \&No Ta Yes Ta \&No 209.It Ic onintr Ta \&No Ta Yes Ta \&No 210.It Ic popd Ta \&No Ta Yes Ta \&No 211.It Ic printf Ta Yes Ta Yes Ta Yes 212.It Ic pushd Ta \&No Ta Yes Ta \&No 213.It Ic pwd Ta Yes Ta \&No Ta Yes 214.It Ic readonly Ta \&No Ta \&No Ta Yes 215.It Ic rehash Ta \&No Ta Yes Ta \&No 216.It Ic repeat Ta \&No Ta Yes Ta \&No 217.It Ic set Ta \&No Ta Yes Ta \&Yes 218.It Ic setenv Ta \&No Ta Yes Ta \&No 219.It Ic setvar Ta \&No Ta \&No Ta Yes 220.It Ic shift Ta \&No Ta Yes Ta Yes 221.It Ic source Ta \&No Ta Yes Ta \&No 222.It Ic stop Ta \&No Ta Yes Ta \&No 223.It Ic suspend Ta \&No Ta Yes Ta \&No 224.It Ic switch Ta \&No Ta Yes Ta \&No 225.It Ic then Ta \&No Ta \&No Ta Yes 226.It Ic time Ta Yes Ta Yes Ta \&No 227.It Ic trap Ta \&No Ta \&No Ta Yes 228.It Ic type Ta \&No Ta \&No Ta Yes 229.It Ic ulimit Ta \&No Ta \&No Ta Yes 230.It Ic umask Ta \&No Ta Yes Ta Yes 231.It Ic unalias Ta \&No Ta Yes Ta Yes 232.It Ic unhash Ta \&No Ta Yes Ta \&No 233.It Ic unlimit Ta \&No Ta Yes Ta \&No 234.It Ic unset Ta \&No Ta Yes Ta Yes 235.It Ic unsetenv Ta \&No Ta Yes Ta \&No 236.It Ic until Ta \&No Ta \&No Ta Yes 237.It Ic wait Ta \&No Ta Yes Ta Yes 238.It Ic which Ta Yes Ta Yes Ta \&No 239.It Ic while Ta \&No Ta Yes Ta \&No 240.El 241.Sh SEE ALSO 242.Xr csh 1 , 243.Xr echo 1 , 244.Xr kill 1 , 245.Xr login 1 , 246.Xr nice 1 , 247.Xr nohup 1 , 248.Xr printf 1 , 249.Xr pwd 1 , 250.Xr sh 1 , 251.Xr time 1 , 252.Xr which 1 253.Sh HISTORY 254The 255.Nm 256manual page first appeared in 257.Fx 4.0 . 258.Sh AUTHORS 259This manual page was written by 260.An Sheldon Hearn Aq sheldonh@FreeBSD.org . 261