Sort the third through last arguments (files) and save the output in a unique temporary file:
sort $argv[3-] > tmp.$$
commands only if the shell is interactive (i.e., the
if ($?prompt) then set commands, alias commands, etc. endif
set aa=(/progs/num.c /book/chap.ps)
set var =value
or by simply turning them on:
In the following table, variables that accept values are shown with the equals sign followed by the type of value they accept; the value is then described. (Note, however, that variables such as
# PREDEFINED VARIABLES set path=(~ ~/bin /usr/ucb /bin /usr/bin . ) set mail=(/var/mail/tom) if ($?prompt) then # Settings for interactive use set echo set filec set noclobber ignoreeof set cdpath=(/usr/lib /var/spool/uucp) # Now I can type cd macros # instead of cd /usr/lib/macros set fignore=.o # Ignore object files for filec set history=100 savehist=25 set prompt='tom \!% ' # Includes history number set time=3 # MY VARIABLES set man1="/usr/man/man1" # Lets me do cd $man1, ls $man1 set a="[a-z]*" # Lets me do vi $a set A="[A-Z]*" # Or grep string $A # ALIASES alias c "clear; dirs" # Use quotes to protect ; or | alias h "history | more" alias j jobs -l alias ls ls -sFC # Redefine ls command alias del 'mv \!* ~/tmp_dir'# A safe alternative to rm endif
The C shell maintains a set of environment variables , which are distinct from shell variables and aren't really part of the C shell. Shell variables are meaningful only within the current shell, but environment variables are automatically exported, making them available globally. For example, C shell variables are accessible only to a particular script in which they're defined, whereas environment variables can be used by any shell scripts, mail utilities, or editors you might invoke.
Environment variables are assigned as follows:
setenv VAR value
By convention, environment variable names are all uppercase. You can create your own environment variables, or you can use the following predefined environment variables.
These environment variables have a corresponding C shell variable:
Other environment variables include the following: