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