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.\"
| 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.\"
|
28.\" 29.Dd May 9, 2010 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 limit , 91.Nm local , 92.Nm log , 93.Nm login , 94.Nm logout , 95.Nm ls-F , 96.Nm nice , 97.Nm nohup , 98.Nm notify , 99.Nm onintr , 100.Nm popd , 101.Nm printenv , 102.Nm pushd , 103.Nm pwd , 104.Nm read , 105.Nm readonly , 106.Nm rehash , 107.Nm repeat , 108.Nm return , 109.Nm sched , 110.Nm set , 111.Nm setenv , 112.Nm settc , 113.Nm setty , 114.Nm setvar , 115.Nm shift , 116.Nm source , 117.Nm stop , 118.Nm suspend , 119.Nm switch , 120.Nm telltc , 121.Nm test , 122.Nm then , 123.Nm time , 124.Nm times , 125.Nm trap , 126.Nm true , 127.Nm type , 128.Nm ulimit , 129.Nm umask , 130.Nm unalias , 131.Nm uncomplete , 132.Nm unhash , 133.Nm unlimit , 134.Nm unset , 135.Nm unsetenv , 136.Nm until , 137.Nm wait , 138.Nm where , 139.Nm which , 140.Nm while 141.Nd shell built-in commands 142.Sh SYNOPSIS 143See the built-in command description in the appropriate shell manual page. 144.Sh DESCRIPTION 145Shell builtin commands are commands that can be executed within the 146running shell's process. 147Note that, in the case of 148.Xr csh 1 149builtin commands, the command is executed in a subshell if it occurs as 150any component of a pipeline except the last. 151.Pp 152If a command specified to the shell contains a slash 153.Ql / , 154the shell will not execute a builtin command, even if the last component 155of the specified command matches the name of a builtin command. 156Thus, while specifying 157.Dq Li echo 158causes a builtin command to be executed under shells that support the 159.Nm echo 160builtin command, 161specifying 162.Dq Li /bin/echo 163or 164.Dq Li ./echo 165does not. 166.Pp 167While some builtin commands may exist in more than one shell, their 168operation may be different under each shell which supports them. 169Below is a table which lists shell builtin commands, the standard shells 170that support them and whether they exist as standalone utilities. 171.Pp 172Only builtin commands for the 173.Xr csh 1 174and 175.Xr sh 1 176shells are listed here. 177Consult a shell's manual page for 178details on the operation its builtin commands. 179Beware that the 180.Xr sh 1 181manual page, at least, calls some of these commands 182.Dq built-in commands 183and some of them 184.Dq reserved words . 185Users of other shells may need to consult an 186.Xr info 1 187page or other sources of documentation. 188.Pp 189Commands marked 190.Dq Li No** 191under 192.Em External 193do exist externally, 194but are implemented as scripts using a builtin command of the same name. 195.Bl -column ".Ic uncomplete" ".Em External" ".Xr csh 1" ".Xr sh 1" -offset indent
| 28.\" 29.Dd May 9, 2010 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 limit , 91.Nm local , 92.Nm log , 93.Nm login , 94.Nm logout , 95.Nm ls-F , 96.Nm nice , 97.Nm nohup , 98.Nm notify , 99.Nm onintr , 100.Nm popd , 101.Nm printenv , 102.Nm pushd , 103.Nm pwd , 104.Nm read , 105.Nm readonly , 106.Nm rehash , 107.Nm repeat , 108.Nm return , 109.Nm sched , 110.Nm set , 111.Nm setenv , 112.Nm settc , 113.Nm setty , 114.Nm setvar , 115.Nm shift , 116.Nm source , 117.Nm stop , 118.Nm suspend , 119.Nm switch , 120.Nm telltc , 121.Nm test , 122.Nm then , 123.Nm time , 124.Nm times , 125.Nm trap , 126.Nm true , 127.Nm type , 128.Nm ulimit , 129.Nm umask , 130.Nm unalias , 131.Nm uncomplete , 132.Nm unhash , 133.Nm unlimit , 134.Nm unset , 135.Nm unsetenv , 136.Nm until , 137.Nm wait , 138.Nm where , 139.Nm which , 140.Nm while 141.Nd shell built-in commands 142.Sh SYNOPSIS 143See the built-in command description in the appropriate shell manual page. 144.Sh DESCRIPTION 145Shell builtin commands are commands that can be executed within the 146running shell's process. 147Note that, in the case of 148.Xr csh 1 149builtin commands, the command is executed in a subshell if it occurs as 150any component of a pipeline except the last. 151.Pp 152If a command specified to the shell contains a slash 153.Ql / , 154the shell will not execute a builtin command, even if the last component 155of the specified command matches the name of a builtin command. 156Thus, while specifying 157.Dq Li echo 158causes a builtin command to be executed under shells that support the 159.Nm echo 160builtin command, 161specifying 162.Dq Li /bin/echo 163or 164.Dq Li ./echo 165does not. 166.Pp 167While some builtin commands may exist in more than one shell, their 168operation may be different under each shell which supports them. 169Below is a table which lists shell builtin commands, the standard shells 170that support them and whether they exist as standalone utilities. 171.Pp 172Only builtin commands for the 173.Xr csh 1 174and 175.Xr sh 1 176shells are listed here. 177Consult a shell's manual page for 178details on the operation its builtin commands. 179Beware that the 180.Xr sh 1 181manual page, at least, calls some of these commands 182.Dq built-in commands 183and some of them 184.Dq reserved words . 185Users of other shells may need to consult an 186.Xr info 1 187page or other sources of documentation. 188.Pp 189Commands marked 190.Dq Li No** 191under 192.Em External 193do exist externally, 194but are implemented as scripts using a builtin command of the same name. 195.Bl -column ".Ic uncomplete" ".Em External" ".Xr csh 1" ".Xr sh 1" -offset indent
|