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 February 23, 2005 30.Dt BUILTIN 1 31.Os 32.Sh NAME 33.Nm builtin , 34.Nm alias , 35.Nm alloc , 36.Nm bg , 37.Nm bind , 38.Nm bindkey , 39.Nm break , 40.Nm breaksw , 41.Nm builtins , 42.Nm case , 43.Nm cd , 44.Nm chdir , 45.Nm command , 46.Nm complete , 47.Nm continue , 48.Nm default , 49.Nm dirs , 50.Nm do , 51.Nm done , 52.Nm echo , 53.Nm echotc , 54.Nm elif , 55.Nm else , 56.Nm end , 57.Nm endif , 58.Nm endsw , 59.Nm esac , 60.Nm eval , 61.Nm exec , 62.Nm exit , 63.Nm export , 64.Nm false , 65.Nm fc , 66.Nm fg , 67.Nm filetest , 68.Nm fi , 69.Nm for , 70.Nm foreach , 71.Nm getopts , 72.Nm glob , 73.Nm goto , 74.Nm hash , 75.Nm hashstat , 76.Nm history , 77.Nm hup , 78.Nm if , 79.Nm jobid , 80.Nm jobs , 81.Nm kill , 82.Nm limit , 83.Nm log , 84.Nm login , 85.Nm logout , 86.Nm ls-F , 87.Nm nice , 88.Nm nohup , 89.Nm notify , 90.Nm onintr , 91.Nm popd , 92.Nm printenv , 93.Nm pushd , 94.Nm pwd , 95.Nm read , 96.Nm readonly , 97.Nm rehash , 98.Nm repeat , 99.Nm sched , 100.Nm set , 101.Nm setenv , 102.Nm settc , 103.Nm setty , 104.Nm setvar , 105.Nm shift , 106.Nm source , 107.Nm stop , 108.Nm suspend , 109.Nm switch , 110.Nm telltc , 111.Nm test , 112.Nm then , 113.Nm time , 114.Nm trap , 115.Nm true , 116.Nm type , 117.Nm ulimit , 118.Nm umask , 119.Nm unalias , 120.Nm uncomplete , 121.Nm unhash , 122.Nm unlimit , 123.Nm unset , 124.Nm unsetenv , 125.Nm until , 126.Nm wait , 127.Nm where , 128.Nm which , 129.Nm while 130.Nd shell builtin commands 131.Sh SYNOPSIS 132.Nm 133.Op Fl options 134.Op Ar args ... 135.Sh DESCRIPTION 136Shell builtin commands are commands that can be executed within the 137running shell's process. 138Note that, in the case of 139.Xr csh 1 140builtin commands, the command is executed in a subshell if it occurs as 141any component of a pipeline except the last. 142.Pp 143If a command specified to the shell contains a slash 144.Dq \&/ , 145the shell will not execute a builtin command, even if the last component 146of the specified command matches the name of a builtin command. 147Thus, while specifying 148.Dq Ic echo 149causes a builtin command to be executed under shells that support the 150builtin echo command, 151specifying 152.Dq Pa /bin/echo 153or 154.Dq Pa ./echo 155does not. 156.Pp 157While some builtin commands may exist in more than one shell, their 158operation may be different under each shell which supports them. 159Below is a table which lists shell builtin commands, the standard shells 160that support them and whether they exist as standalone utilities. 161.Pp 162Only builtin commands for the 163.Xr csh 1 164and 165.Xr sh 1 166shells are listed here. 167Commands marked 168.Dq Li No** 169under 170.Em External 171do exist externally, 172but are implemented as scripts using a builtin command of the same name. 173Consult a shell's manual page for 174details on the operation its builtin commands. 175Users of other shells may need to consult an 176.Xr info 1 177page or other sources of documentation. 178.Bl -column ".Ic uncomplete" ".Em External" ".Xr csh 1" ".Xr sh 1" -offset indent 179.It Xo 180.Em "Command External" Ta Xr csh 1 Ta Xr sh 1 181.Xc 182.It Ic alias Ta Yes Ta Yes Ta Yes 183.It Ic alloc Ta \&No Ta Yes Ta \&No 184.It Ic bg Ta No** Ta Yes Ta Yes 185.It Ic bind Ta \&No Ta \&No Ta Yes 186.It Ic bindkey Ta \&No Ta Yes Ta \&No 187.It Ic break Ta \&No Ta Yes Ta \&Yes 188.It Ic breaksw Ta \&No Ta Yes Ta \&No 189.It Ic builtin Ta \&No Ta \&No Ta Yes 190.It Ic builtins Ta \&No Ta Yes Ta \&No 191.It Ic case Ta \&No Ta Yes Ta Yes 192.It Ic cd Ta \&No** Ta Yes Ta Yes 193.It Ic chdir Ta \&No Ta Yes Ta \&Yes 194.It Ic Ta \&No Ta \&No Ta Yes 195.It Ic complete Ta \&No Ta Yes Ta \&No 196.It Ic continue Ta \&No Ta Yes Ta \&Yes 197.It Ic default Ta \&No Ta Yes Ta \&No 198.It Ic dirs Ta \&No Ta Yes Ta \&No 199.It Ic do Ta \&No Ta \&No Ta Yes 200.It Ic done Ta \&No Ta \&No Ta Yes 201.It Ic echo Ta Yes Ta Yes Ta Yes 202.It Ic echotc Ta \&No Ta Yes Ta \&No 203.It Ic elif Ta \&No Ta \&No Ta Yes 204.It Ic else Ta \&No Ta Yes Ta \&Yes 205.It Ic end Ta \&No Ta Yes Ta \&No 206.It Ic endif Ta \&No Ta Yes Ta \&No 207.It Ic endsw Ta \&No Ta Yes Ta \&No 208.It Ic esac Ta \&No Ta \&No Ta Yes 209.It Ic eval Ta \&No Ta Yes Ta Yes 210.It Ic exec Ta \&No Ta Yes Ta Yes 211.It Ic exit Ta \&No Ta Yes Ta Yes 212.It Ic export Ta \&No Ta \&No Ta Yes 213.It Ic false Ta Yes Ta \&No Ta Yes 214.It Ic fc Ta \&No** Ta \&No Ta Yes 215.It Ic fg Ta \&No** Ta Yes Ta Yes 216.It Ic filetest Ta \&No Ta Yes Ta \&No 217.It Ic fi Ta \&No Ta \&No Ta Yes 218.It Ic for Ta \&No Ta \&No Ta Yes 219.It Ic foreach Ta \&No Ta Yes Ta \&No 220.It Ic getopts Ta \&No** Ta \&No Ta Yes 221.It Ic glob Ta \&No Ta Yes Ta \&No 222.It Ic goto Ta \&No Ta Yes Ta \&No 223.It Ic hash Ta \&No Ta \&No Ta Yes 224.It Ic hashstat Ta \&No Ta Yes Ta \&No 225.It Ic history Ta \&No Ta Yes Ta \&No 226.It Ic hup Ta \&No Ta Yes Ta \&No 227.It Ic if Ta \&No Ta Yes Ta \&Yes 228.It Ic jobid Ta \&No Ta \&No Ta Yes 229.It Ic jobs Ta \&No** Ta Yes Ta Yes 230.It Ic kill Ta Yes Ta Yes Ta \&No 231.It Ic limit Ta \&No Ta Yes Ta \&No 232.It Ic log Ta \&No Ta Yes Ta \&No 233.It Ic login Ta Yes Ta Yes Ta \&No 234.It Ic logout Ta \&No Ta Yes Ta \&No 235.It Ic ls-F Ta \&No Ta Yes Ta \&No 236.It Ic nice Ta Yes Ta Yes Ta \&No 237.It Ic nohup Ta Yes Ta Yes Ta \&No 238.It Ic notify Ta \&No Ta Yes Ta \&No 239.It Ic onintr Ta \&No Ta Yes Ta \&No 240.It Ic popd Ta \&No Ta Yes Ta \&No 241.It Ic printenv Ta Yes Ta Yes Ta \&No 242.It Ic pushd Ta \&No Ta Yes Ta \&No 243.It Ic pwd Ta Yes Ta \&No Ta Yes 244.It Ic read Ta \&No** Ta \&No Ta Yes 245.It Ic readonly Ta \&No Ta \&No Ta Yes 246.It Ic rehash Ta \&No Ta Yes Ta \&No 247.It Ic repeat Ta \&No Ta Yes Ta \&No 248.It Ic sched Ta \&No Ta Yes Ta \&No 249.It Ic set Ta \&No Ta Yes Ta \&Yes 250.It Ic setenv Ta \&No Ta Yes Ta \&No 251.It Ic settc Ta \&No Ta Yes Ta \&No 252.It Ic setty Ta \&No Ta Yes Ta \&No 253.It Ic setvar Ta \&No Ta \&No Ta Yes 254.It Ic shift Ta \&No Ta Yes Ta Yes 255.It Ic source Ta \&No Ta Yes Ta \&No 256.It Ic stop Ta \&No Ta Yes Ta \&No 257.It Ic suspend Ta \&No Ta Yes Ta \&No 258.It Ic switch Ta \&No Ta Yes Ta \&No 259.It Ic telltc Ta \&No Ta Yes Ta \&No 260.It Ic test Ta Yes Ta \&No Ta Yes 261.It Ic then Ta \&No Ta \&No Ta Yes 262.It Ic time Ta Yes Ta Yes Ta \&No 263.It Ic trap Ta \&No Ta \&No Ta Yes 264.It Ic true Ta Yes Ta \&No Ta Yes 265.It Ic type Ta \&No Ta \&No Ta Yes 266.It Ic ulimit Ta \&No Ta \&No Ta Yes 267.It Ic umask Ta \&No** Ta Yes Ta Yes 268.It Ic unalias Ta \&No** Ta Yes Ta Yes 269.It Ic uncomplete Ta \&No Ta Yes Ta \&No 270.It Ic unhash Ta \&No Ta Yes Ta \&No 271.It Ic unlimit Ta \&No Ta Yes Ta \&No 272.It Ic unset Ta \&No Ta Yes Ta Yes 273.It Ic unsetenv Ta \&No Ta Yes Ta \&No 274.It Ic until Ta \&No Ta \&No Ta Yes 275.It Ic wait Ta \&No** Ta Yes Ta Yes 276.It Ic where Ta \&No Ta Yes Ta \&No 277.It Ic which Ta Yes Ta Yes Ta \&No 278.It Ic while Ta \&No Ta Yes Ta \&Yes 279.El 280.Sh SEE ALSO 281.Xr csh 1 , 282.Xr echo 1 , 283.Xr false 1 , 284.Xr info 1 , 285.Xr kill 1 , 286.Xr login 1 , 287.Xr nice 1 , 288.Xr nohup 1 , 289.Xr printenv 1 , 290.Xr pwd 1 , 291.Xr sh 1 , 292.Xr test 1 , 293.Xr time 1 , 294.Xr true 1 , 295.Xr which 1 296.Sh HISTORY 297The 298.Nm 299manual page first appeared in 300.Fx 3.4 . 301.Sh AUTHORS 302This manual page was written by 303.An Sheldon Hearn Aq sheldonh@FreeBSD.org . 304