home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeLinux in a NutshellSearch this book

8.2. Invoking the Shell

A shell command interpreter can be invoked as follows:

csh  [options]  [arguments]
tcsh  [options]  [arguments]

csh and tcsh use syntax resembling C and execute commands from a terminal or a file. Options -n, -v, and -x are useful when debugging scripts.

8.2.1. Options


Allow the remaining command-line options to be interpreted as options to a specified command, rather than as options to csh itself.


Execute command specified following the argument.


Load directory stack from ~/.cshdirs even if not a login shell. (tcsh)


Exit if a command produces errors.


Fast startup; start without executing .cshrc or .tcshrc.


Invoke interactive shell (prompt for input).


Login shell (must be the only option specified).


Load ~/.tcshrc even if effective user is not the owner of the file. (tcsh)


Parse commands, but do not execute.


Read commands from the standard input.


Exit after executing one command.


Display commands before executing them; expand history substitutions, but not other substitutions (e.g., filename, variable, and command). Same as setting verbose.


Same as -v, but also display .cshrc.


Display commands before executing them, but expand all substitutions. Same as setting echo.


Same as -x, but also display .cshrc.

8.2.2. Arguments

Arguments are assigned, in order, to the positional parameters $1, $2, and so on. If the first argument is an executable script, commands are read from it, and remaining arguments are assigned to $1, $2, and so forth.

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.