Up Next Previous

Argument list processing

If the first argument (argument 0) to the shell is `-' then it is a login shell. A login shell can be also specified by invoking the shell with the -l flag as the only argument.

The rest of the flag arguments are interpreted as follows:

Forces a ``break'' from option processing, causing any further shell arguments to be treated as non-option arguments. The remaining arguments will not be interpreted as shell options. This may be used to pass options to a shell script without confusion or possible subterfuge. The shell will not run a set-user ID script without this option.

Commands are read from the (single) following argument which must be present. Any remaining arguments are placed in the argv shell variable.

The shell loads the directory stack from ~/.cshdirs as described under Startup and shutdown, whether or not it is a login shell. (+)

Sets the environment variable name to value. (Domain/OS only) (+)

The shell exits if any invoked command terminates abnormally or yields a non-zero exit status.

The shell ignores ~/.tcshrc, and thus starts faster.

The shell uses fork(2) instead of vfork(2) to spawn processes. (Convex/OS only) (+)

The shell is interactive and prompts for its top-level input, even if it appears to not be a terminal. Shells are interactive without this option if their inputs and outputs are terminals.

The shell is a login shell. Only applicable if -l is the only flag specified.

The shell loads ~/.tcshrc even if it does not belong to the effective user. Newer versions of su(1) can pass -m to the shell. (+)

The shell parses commands but does not execute them. This aids in debugging shell scripts.

The shell accepts SIGQUIT (see Signal handling) and behaves when it is used under a debugger. Job control is disabled. (u)

Command input is taken from the standard input.

The shell reads and executes a single line of input. A `\' may be used to escape the newline at the end of this line and continue onto another line.

Sets the verbose shell variable, so that command input is echoed after history substitution.

Sets the echo shell variable, so that commands are echoed immediately before execution.

Sets the verbose shell variable even before executing ~/.tcshrc.

Is to -x as -V is to -v.

After processing of flag arguments, if arguments remain but none of the -c, -i, -s, or -t options were given, the first argument is taken as the name of a file of commands, or ``script'', to be executed. The shell opens this file and saves its name for possible resubstitution by `$0'. Since many systems use either the standard version 6 or version 7 shells whose shell scripts are not compatible with this shell, the shell uses such a `standard' shell to execute a script whose first character is not a `#', i.e. which does not start with a comment.

Remaining arguments are placed in the argv shell variable.

Up Next Previous