Linux / Unix csh command

Quick links

About csh
Syntax
Examples
Related commands
Unix main page

About csh

csh, the C shell, is a command interpreter with a syntax similar to the C language.

Syntax

csh [-b] [-c] [-e] [-f] [-i] [-n] [-s] [-t] [-v] [-V] [-x] [-X] [scriptname]

 

-bForce a "break" from option processing. Subsequent command line arguments are not interpreted as C shell options. This allows the passing of options to a script without confusion. The shell does not run set-user-ID or set-group-ID scripts unless this option is present.
-cExecute the first argument (which must be present). Remaining arguments are placed in argv, the argument-list variable, and passed directly to csh .
-eExit if a command terminates abnormally or yields a nonzero exit status.
-fFast start. Read neither the .cshrc file, nor the .login file (if a login shell) upon startup.
-iForced interactive. Prompt for command line input, even if the standard input does not appear to be a terminal (character-special device).
-nParse (interpret), but do not execute commands. This option can be used to check C shell scripts for syntax errors.
-sTake commands from the standard input.
-tRead and execute a single command line. A `\' (backslash) can be used to escape each new line for continuation of the command line onto subsequent input lines.
-vVerbose. Set the verbose predefined variable; command input is echoed after history substitution (but before other substitutions) and before execution.
-VSet verbose before reading .cshrc.
-xEcho. Set the echo variable; echo commands after all substitutions and just before execution.
-XSet echo before reading .cshrc.

Examples

csh - executes and runs the C Shell if present

See the .cshrc definition page for an example of the .cshrc file and additional information about this file.

Related commands

bash
bc
echo
login
ls
more
ps
sh