UNIX Reference Manual (794271), страница 6
Текст из файла (страница 6)
Thus all aliases are removed by ‘unalias ∗’. It is not an error for nothing to be unaliased.unhashUse of the internal hash table to speed location of executed programs is disabled.unlimitunlimit resourceunlimit −hunlimit −h resourceRemoves the limitation on resource. If no resource is specified, then all resourcelimitations are removed. If −h is given, the corresponding hard limits are removed. Onlythe super-user may do this.unset patternAll variables whose names match the specified pattern are removed. Thus all variables areremoved by ‘unset ∗’; this has noticeably distasteful side-effects. It is not an error for nothing to be unset.4th Berkeley DistributionJanuary 21, 199416CSH ( 1 )UNIX Reference ManualCSH ( 1 )unsetenv patternRemoves all variables whose name match the specified pattern from the environment.
Seealso the setenv command above and printenv(1).Wait for all background jobs. If the shell is interactive, then an interrupt can disrupt the wait.After the interrupt, the shell prints names and job numbers of all jobs known to be outstanding.which commandDisplays the resolved command that will be executed by the shell.waitwhile (expr)...endWhile the specified expression evaluates non-zero, the commands between the while andthe matching end are evaluated. Break and continue may be used to terminate or continue the loop prematurely.
(The while and end must appear alone on their input lines.)Prompting occurs here the first time through the loop as for the foreach statement if theinput is a terminal.%jobBrings the specified job into the foreground.%job &Continues the specified job in the background.@@name= expr@name[index]= exprThe first form prints the values of all the shell variables. The second form sets the specifiedname to the value of expr. If the expression contains ‘<’, ‘>’, ‘&’ or ‘|’ then at least thispart of the expression must be placed within ‘(’ ‘)’. The third form assigns the value ofexpr to the index’th argument of name. Both name and its index’th component mustalready exist.The operators ‘∗=’, ‘+=’, etc are available as in C. The space separating the name from the assignment operator is optional.
Spaces are, however, mandatory in separating components of expr which would otherwisebe single words.Special postfix ‘+ +’ and ‘− −’ operators increment and decrement name respectively, i.e., ‘@ i++’.Pre-defined and environment variablesThe following variables have special meaning to the shell. Of these, argv, cwd, home, path, prompt,shell and status are always set by the shell. Except for cwd and status, this setting occurs only atinitialization; these variables will not then be modified unless done explicitly by the user.The shell copies the environment variable USER into the variable user, TERM into term, and HOME intohome, and copies these back into the environment whenever the normal shell variables are reset.
The environment variable PATH is likewise handled; it is not necessary to worry about its setting other than in the file.cshrc as inferior csh processes will import the definition of path from the environment, and re-export itif you then change it.argvSet to the arguments to the shell, it is from this variable that positional parameters are substituted, i.e., ‘$1’ is replaced by ‘$argv[1]’, etc.cdpathGives a list of alternate directories searched to find subdirectories in chdir commands.cwdThe full pathname of the current directory.4th Berkeley DistributionJanuary 21, 199417CSH ( 1 )UNIX Reference ManualCSH ( 1 )echoSet when the −x command line option is given.
Causes each command and its arguments tobe echoed just before it is executed. For non-builtin commands all expansions occur beforeechoing. Builtin commands are echoed before command and filename substitution, sincethese substitutions are then done selectively.filecEnable file name completion.histchars Can be given a string value to change the characters used in history substitution.
The firstcharacter of its value is used as the history substitution character, replacing the default character ‘!’. The second character of its value replaces the character ‘↑’ in quick substitutions.histfileCan be set to the pathname where history is going to be saved/restored.historyCan be given a numeric value to control the size of the history list. Any command that hasbeen referenced in this many events will not be discarded.
Too large values of history mayrun the shell out of memory. The last executed command is always saved on the history list.homeThe home directory of the invoker, initialized from the environment. The filename expansionof ‘˜’ refers to this variable.ignoreeof If set the shell ignores end-of-file from input devices which are terminals. This prevents shellsfrom accidentally being killed by control-D’s.mailThe files where the shell checks for mail. This checking is done after each command completion that will result in a prompt, if a specified interval has elapsed. The shell says ‘You havenew mail.’ if the file exists with an access time not greater than its modify time.If the first word of the value of mail is numeric it specifies a different mail checking interval,in seconds, than the default, which is 10 minutes.If multiple mail files are specified, then the shell says ‘New mail in name’ when there is mailin the file name.noclobber As described in the section on input/output, restrictions are placed on output redirection to insure that files are not accidentally destroyed, and that ‘>>’ redirections refer to existing files.noglobIf set, filename expansion is inhibited.
This inhibition is most useful in shell scripts thatare not dealing with filenames, or after a list of filenames has been obtained and further expansions are not desirable.nonomatch If set, it is not an error for a filename expansion to not match any existing files; instead theprimitive pattern is returned.
It is still an error for the primitive pattern to be malformed, i.e.,‘echo [’ still gives an error.notifyIf set, the shell notifies asynchronously of job completions; the default is to present job completions just before printing a prompt.pathEach word of the path variable specifies a directory in which commands are to be sought forexecution. A null word specifies the current directory.
If there is no path variable then onlyfull path names will execute. The usual search path is ‘.’, ‘/bin’ and ‘/usr/bin’, but this mayvary from system to system. For the super-user the default search path is ‘/etc’, ‘/bin’ and‘/usr/bin’. A shell that is given neither the −c nor the −t option will normally hash the contents of the directories in the path variable after reading .cshrc, and each time the pathvariable is reset. If new commands are added to these directories while the shell is active, itmay be necessary to do a rehash or the commands may not be found.promptThe string that is printed before each command is read from an interactive terminal input.
If a‘!’ appears in the string it will be replaced by the current event number unless a preceding ‘\’4th Berkeley DistributionJanuary 21, 199418CSH ( 1 )UNIX Reference ManualCSH ( 1 )is given. Default is ‘% ’, or ‘# ’ for the super-user.savehistIs given a numeric value to control the number of entries of the history list that are saved in˜/.history when the user logs out. Any command that has been referenced in this many eventswill be saved. During start up the shell sources ˜/.history into the history list enabling historyto be saved across logins.
Too large values of savehist will slow down the shell duringstart up. If savehist is just set, the shell will use the value of history.shellThe file in which the shell resides. This variable is used in forking shells to interpret files thathave execute bits set, but which are not executable by the system. (See the description ofNon-builtin Command Execution below.) Initialized to the (system-dependent) home of theshell.statusThe status returned by the last command. If it terminated abnormally, then 0200 is added tothe status.
Builtin commands that fail return exit status ‘1’, all other builtin commands set status to ‘0’.timeControls automatic timing of commands. If set, then any command that takes more than thismany cpu seconds will cause a line giving user, system, and real times and a utilization percentage which is the ratio of user plus system times to real time to be printed when it terminates.verboseSet by the −v command line option, causes the words of each command to be printed afterhistory substitution.Non-builtin command executionWhen a command to be executed is found to not be a builtin command the shell attempts to execute the command via execve(2).