Previous Topic | Table of Contents | Next Topic

Predefined Per-Thread Variables

Inherited from the parent thread:

Name
Default
Use
* A synonym for the argv variable.
argv Any argument words passed to the shell or to a .csh batch file.
bsdargv 0 If set, $argv[0] contains the name of the script, just as it would under the original Berkeley C shell; by default, $argv[0] is the first argument word.
cdhome 0 If set, “cd” with no argument is the same as “cd $home”; default is to simply print the current directory name.
cdisk Current disk, not including colon.
CDISK Same as cdisk, but in upper case.
chgdisk 0 If set, cd automatically changes the current disk if the path is on another disk.
cwd Full pathname of the current directory.
echoallinput 0 Copy the input to stdout as it’s read. (Similar to echoinput, but inherited from parent to child threads.)
gotowindow 50 Number of statements a goto can jump over (when not inside a nested block) without being considered an error.
nohashing 0 Determine how/whether path hashing is done: 0 means full path hashing of the directories on the search path; 1 means turn off hashing completely; 2 means hash only the directories which do not depend on the setting of the current directory.
noclobber 0 If True, don’t allow redirection to overwrite an existing file unless the “!” override is given.
noglob A synonym for the nowild variable.
nonohidden 0 Determine whether wildcarding will match against hidden files: 0 means don’t match hidden files; 1 means hidden files will be found.
nonomatch 0 Determine the response to a wildcard that doesn’t match anything: 0 means it’s an error; 1 means pass it through to the application; 2 means simply discard it.
nonovar 0 Determine the response to a reference to a non-existent variable, procedure or alias. Same encoding as nonomatch.
nowild 0 If True, turn off filename wildcarding.
nullwords 0 Determines whether an array index off the end of a list is an error (0) or returns a null word (1).
precision 6 Number of decimal places to print when displaying floating point values.
scripted Tells whether this thread is running or called from a script (1) or not (0).
tailstatus 0 Determines whether the status variable will reflect the reflect the return code from the leftmost or rightmost stage of a pipeline: 0 means leftmost; 1 means rightmost.
verbose 0 If True, print out all available information when reporting errors.

echoinput, ignoreerrors and interactive are initialized for the main thread based on command-line options. Each thread has its own independent current disk and current directories, initially inherited from its parent.



Previous Topic | Table of Contents | Next Topic

Copyright © 1988-2003 by Hamilton Laboratories. All rights reserved.