16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Options<br />

A login shell begins by executing commands from the system files /etc/csh.cshrc<br />

and /etc/csh.login.It then executes commands from files in the user’s home<br />

directory: first ~/.tcshrc, then ~/.history (or the value of the histfile shell variable),<br />

then ~/.login, and finally ~/.cshdirs (or the value of the dirsfile shell variable). The<br />

shell reads /etc/csh.login after /etc/csh.cshrc.<br />

Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc on invocation.<br />

<strong>Command</strong>s like stty, which need be run only once per login, usually go in the<br />

user’s ~/.login file.<br />

In the normal case, the shell begins reading commands from the terminal,<br />

prompting with >. The shell repeatedly reads a line of command input, breaks it into<br />

words, places it on the command history list, and then parses and executes each<br />

command in the line. See “<strong>Command</strong> execution” on page 645.<br />

A user can log out of a tcsh shell session by typing ^D, logout, or login on an<br />

empty line (see ignoreeof shell variable), or via the shell’s autologout mechanism.<br />

When a login shell terminates, it sets the logout shell variable to normal or<br />

automatic as appropriate, then executes commands from the files /etc/csh.logout<br />

and ~/.logout.<br />

Note: The names of the system login and logout files vary from system to system<br />

for compatibility with different csh variants; see “tcsh files” on page 671.<br />

If the first argument (argument 0) to the tcsh shell is - (hyphen), then it is a login<br />

shell. You can also specify the login shell by invoking the tcsh shell with the –l as<br />

the only argument.<br />

The z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> tcsh shell accepts the following options on the<br />

command line:<br />

–b Forces a break from option processing, causing any further shell arguments<br />

to be treated as non-option arguments. The remaining arguments will not be<br />

interpreted as shell options. This may be used to pass options to a shell<br />

script without confusion or possible subterfuge.<br />

–c Reads and executes commands stored in the command shell (this option<br />

must be present and must be a single arugment). Any remaining arguments<br />

are placed in the argv shell variable.<br />

–d Loads the directory stack from ~/.cshdirs as described under “Options and<br />

invocation” on page 626, whether or not it is a login shell.<br />

–e Terminates shell if any invoked command terminates abnormally or yields a<br />

non-zero exit status.<br />

–i Invokes an interactive shell and prompts for its top-level input, even if it<br />

appears to not be a terminal. Shells are interactive without this option if<br />

their inputs and outputs are terminals.<br />

–l Invokes a login shell. Only applicable if –l is the only option specified.<br />

Note: –l is a lower-case L not an upper-case i.<br />

–m Loads ~/.tcshrc even if it does not belong to the effective user.<br />

tcsh<br />

Chapter 2. Shell command descriptions 627

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!