Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man1/shell_builtins.1
Real path: /usr/share/man/man1/shell_builtins.1
Zurück
'\" te .\" Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Portions Copyright (c) 1982, 2007, AT&T Knowledge Ventures. .TH shell_builtins 1 "27 Jul 2011" "Oracle Solaris 11.4" "User Commands" .SH NAME shell_builtins, case, for, foreach, function, if, repeat, select, switch, until, while \- shell command interpreter built-in commands .SH DESCRIPTION .sp .LP The shell command interpreters \fBcsh\fR(1), \fBksh\fR(1), \fBksh88\fR(1), and \fBsh\fR(1) have special built-in commands. The commands \fBcase\fR, \fBfor\fR, \fBforeach\fR, \fBfunction\fR, \fBif\fR, \fBrepeat\fR, \fBselect\fR, \fBswitch\fR, \fBuntil\fR, and \fBwhile\fR are commands in the syntax recognized by the shells. They are described in the \fBCommands\fR section of the manual pages of the respective shells. In \fBksh\fR(1), \fBfc\fR, \fBhash\fR, \fBstop\fR, \fBsuspend\fR, \fBtimes\fR, and \fBtype\fR are aliases by default. .sp .LP The remaining commands listed in the following table are built into the shells for reasons such as efficiency or data sharing between command invocations. They are described on their respective manual pages. .sp .TS tab( ); cw(2.75i) cw(2.75i) lw(2.75i) lw(2.75i) . Command Shell _ \fBalarm\fR ksh \fB++**alias\fR csh, ksh88, ksh \fBbg\fR csh, ksh88, ksh, sh \fB+*break\fR csh, ksh88, ksh, sh \fBbuiltin\fR ksh \fBcase\fR csh, ksh88, ksh, sh \fBcd\fR csh, ksh88, ksh, sh \fBchdir\fR csh, sh \fBcommand\fR ksh \fB+*continue\fR csh, ksh88, ksh, sh \fBdirs\fR csh \fBdisown\fR ksh \fBecho\fR csh, ksh88, ksh, sh \fBenum\fR ksh \fB+*eval\fR csh, ksh88, ksh, sh \fB+*exec\fR csh, ksh88, ksh, sh \fB+*exit\fR csh, ksh88, ksh, sh \fB++**export\fR ksh88, ksh, sh \fBfalse\fR ksh88, ksh \fBfc\fR ksh88, ksh \fBfg\fR csh, ksh88, ksh, sh \fBfor\fR ksh88, ksh, sh \fBforeach\fR csh \fBfunction\fR ksh88, ksh \fBgetopts\fR ksh88, ksh, sh \fBglob\fR csh \fBgoto\fR csh \fBhash\fR ksh88, ksh, sh \fBhashstat\fR csh \fBhist\fR ksh \fBhistory\fR csh \fBif\fR csh, ksh88, ksh, sh \fBjobs\fR csh, ksh88, ksh, sh \fBkill\fR csh, ksh88, ksh, sh \fBlet\fR ksh88, ksh, \fBlimit\fR csh \fBlogin\fR csh, ksh88, ksh, sh \fBlogout\fR csh \fBnice\fR csh \fB+*newgrp\fR ksh88, ksh, sh \fBnohup\fR csh \fBnotify\fR csh \fBonintr\fR csh \fBpopd\fR csh \fBprint\fR ksh88, ksh \fBprintf\fR ksh \fBpushd\fR csh \fBpwd\fR ksh88, ksh, sh \fBread\fR ksh88, ksh, sh \fB++**readonly\fR ksh88, ksh, sh \fBrehash\fR csh \fBrepeat\fR csh \fB+*return\fR ksh88, ksh, sh \fBselect\fR ksh88, ksh \fB+set\fR csh, ksh88, ksh, sh \fBsetenv\fR csh \fB*shift\fR csh, ksh88, ksh, sh \fBsource\fR csh \fBstop\fR csh, ksh88, ksh, sh \fBsuspend\fR csh, ksh88, sh \fBswitch\fR csh \fBtest\fR ksh88, ksh, sh \fBtime\fR csh \fB*times\fR ksh88, ksh, sh \fB*+trap\fR ksh88, ksh, sh \fBtrue\fR ksh88, ksh \fBtype\fR ksh88, ksh, sh \fB++**typeset\fR ksh88, ksh \fBulimit\fR ksh88, ksh, sh \fBumask\fR csh, ksh88, ksh, sh \fB+unalias\fR csh, ksh88, ksh \fBunhash\fR csh \fBunlimit\fR csh \fB+unset\fR csh, ksh88, ksh, sh \fBunsetenv\fR csh \fBuntil\fR ksh88, ksh, sh \fBvmap\fR ksh \fBvpath\fR ksh \fB*wait\fR csh, ksh88, ksh, sh \fBwhence\fR ksh88, ksh \fBwhile\fR csh, ksh88, ksh, sh .TE .sp .SS "Bourne Shell, sh, Special Commands" .sp .LP Input/output redirection is now permitted for these commands. File descriptor 1 is the default output location. When Job Control is enabled, additional \fBSpecial Commands\fR are added to the shell's environment. .sp .LP In addition to these built-in reserved command words, \fBsh\fR also uses: .sp .ne 2 .mk .na \fB\fB:\fR\fR .ad .RS 13n .rt No effect; the command does nothing. A zero exit code is returned. .RE .sp .ne 2 .mk .na \fB\fB.\fR\fIfilename\fR\fR .ad .RS 13n .rt Read and execute commands from \fIfilename\fR and return. The search path specified by \fBPATH\fR is used to find the directory containing \fIfilename\fR. .RE .SS "C shell, csh" .sp .LP Built-in commands are executed within the C shell. If a built-in command occurs as any component of a pipeline except the last, it is executed in a subshell. In addition to these built-in reserved command words, \fBcsh\fR also uses: .sp .ne 2 .mk .na \fB\fB:\fR\fR .ad .RS 5n .rt Null command. This command is interpreted, but performs no action. .RE .SS "Korn Shell, ksh88, Special Commands" .sp .LP Input/Output redirection is permitted. Unless otherwise indicated, the output is written on file descriptor 1 and the exit status, when there is no syntax error, is zero. .sp .LP Commands that are preceded by one or two \fB*\fR (asterisks) are treated specially in the following ways: .RS +4 .TP 1. Variable assignment lists preceding the command remain in effect when the command completes. .RE .RS +4 .TP 2. \fBI/O\fR redirections are processed after variable assignments. .RE .RS +4 .TP 3. Errors cause a script that contains them to abort. .RE .RS +4 .TP 4. Words, following a command preceded by \fB**\fR that are in the format of a variable assignment, are expanded with the same rules as a variable assignment. This means that tilde substitution is performed after the \fB=\fR sign and word splitting and file name generation are not performed. .RE .sp .LP In addition to these built-in reserved command words, \fBksh88\fR also uses: .sp .ne 2 .mk .na \fB* \fB:\fR [ \fIarg\fR .\|.\|. ]\fR .ad .RS 27n .rt The command only expands parameters. .RE .sp .ne 2 .mk .na \fB* \fB.\fR\fIfile\fR [ \fIarg\fR .\|.\|. ]\fR .ad .RS 27n .rt Read the complete \fIfile\fR then execute the commands. The commands are executed in the current shell environment. The search path specified by \fBPATH\fR is used to find the directory containing \fIfile\fR. If any arguments \fIarg\fR are specified, they become the positional parameters. Otherwise, the positional parameters are unchanged. The exit status is the exit status of the last command executed. the loop termination test. .RE .SS "Korn Shell, ksh, Special Commands" .sp .LP Input/Output redirection is permitted. Unless otherwise indicated, the output is written on file descriptor 1 and the exit status, when there is no syntax error, is zero. .sp .LP Except for \fB:\fR, \fBtrue\fR, \fBfalse\fR, \fBecho\fR, \fBnewgrp\fR, and \fBlogin\fR, all built-in commands accept \fB--\fR to indicate end of options. They also interpret the option \fB--man\fR as a request to display the manual page onto standard error and \fB-?\fR as a help request which prints a usage message on standard error. .sp .LP Commands that are preceded by one or two \fB+\fR are treated specially in the following ways: .RS +4 .TP 1. Variable assignment lists preceding the command remain in effect when the command completes. .RE .RS +4 .TP 2. \fBI/O\fR redirections are processed after variable assignments. .RE .RS +4 .TP 3. Errors cause a script that contains them to abort. .RE .RS +4 .TP 4. They are not valid function names. .RE .RS +4 .TP 5. Words, following a command preceded by \fB++\fR that are in the format of a variable assignment, are expanded with the same rules as a variable assignment. This means that tilde substitution is performed after the \fB=\fR sign and field splitting and file name generation are not performed. .RE .sp .LP In addition to these built-in reserved command words, \fBksh\fR also uses: .sp .ne 2 .mk .na \fB\fB:\fR [ \fIarg\fR .\|.\|. ]\fR .ad .RS 25n .rt The command only expands parameters. .RE .sp .ne 2 .mk .na \fB\fB.\fR\fIname\fR [ \fIarg\fR .\|.\|. ]\fR .ad .RS 25n .rt If \fIname\fR is a function defined with the function \fIname\fR reserved word syntax, the function is executed in the current environment (as if it had been defined with the \fBname()\fR syntax.) Otherwise if \fIname\fR refers to a file, the file is read in its entirety and the commands are executed in the current shell environment. The search path specified by \fBPATH\fR is used to find the directory containing the file. If any arguments \fIarg\fR are specified, they become the positional parameters while processing the \fB.\fR command and the original positional parameters are restored upon completion. Otherwise the positional parameters are unchanged. The exit status is the exit status of the last command executed. .RE .SH SEE ALSO .sp .LP \fBtimes\fR(1), \fBalias\fR(1), \fBbreak\fR(1), \fBbuiltin\fR(1), \fBcd\fR(1), \fBchmod\fR(1), \fBcsh\fR(1), \fBdisown\fR(1), \fBecho\fR(1), \fBexec\fR(1), \fBexit\fR(1), \fBfind\fR(1), \fBgetoptcvt\fR(1), \fBgetopts\fR(1), \fBglob\fR(1), \fBhash\fR(1), \fBhistory\fR(1), \fBIntro\fR(1), \fBjobs\fR(1), \fBkill\fR(1), \fBksh\fR(1), \fBksh88\fR(1), \fBlet\fR(1), \fBlimit\fR(1), \fBlogin\fR(1), \fBlogout\fR(1), \fBnewgrp\fR(1), \fBnice\fR(1), \fBnohup\fR(1), \fBprint\fR(1), \fBprintf\fR(1), \fBpwd\fR(1), \fBread\fR(1), \fBreadonly\fR(1), \fBset\fR(1), \fBsh\fR(1), \fBshift\fR(1), \fBsleep\fR(1), \fBsuspend\fR(1), \fBtest\fR(1), \fBtime\fR(1), \fBtrap\fR(1), \fBtypeset\fR(1), \fBumask\fR(1), \fBwait\fR(1), \fBchdir\fR(2), \fBchmod\fR(2), \fBcreat\fR(2), \fBumask\fR(2), \fBgetopt\fR(3C), \fBprofile\fR(5), \fBenviron\fR(7)