The most common shells are :
Commands used to declare and manipulate shell variables:
set - assigns non-numeric string variables locally
unset - removes a previously "set" variable
setenv - assigns non-numeric string variablesglobally
unsetenv - removes a previously setenv variable
@ - assigns numeric variables locally
echo $variable - displays value of variable
As a login shell tcsh executes the following files in this order:
/etc/csh.cshrc
/etc/csh.login
~/.tcshrc
~/.cshrc (if .tcshrc is not found)
~/.history
~/.login
~/.cshdirs
tcsh can be compiled to execute login scripts before cshrc scripts.
Beware!
starts with #!/bin/sh
list of setenv="environment value"
ex : setenv TERM vt100list of set variable="variable value"
ex : set history=10list of aliases
ex : alias h 'history -r |more'limit coredumpsize 0
set path=($path /usr/local/bin . $HOME $HOME/bin)
# Our favourite editor
setenv EDITOR emacs
list of sources
source filename
PATH is a list of directories separated by colons (':') where commands
are looked for.
These directories are searched through to find commands.
If you try to invoke command 'foo', all the directories in PATH (in
that order : the first command found is executed) are searched
for an executable file 'foo' (one with x-bit on). If a file is found, it
is executed.
Example :
My personal path. Add my bin first, then add /usr/new/bin, then include
the default path, then add /usr/old/bin at the end. This setup gives
preference to new software.
In Csh/Tcsh shell edit the .cshrc or .tcshrc file and add:
set path = ( ~/bin /usr/new/bin $path /usr/old/bin
)
runs at invocation of login shell, after the .cshrc file
typically sets terminal characteristics and one time shell options
and environment variables
list of setenv="environment value"
ex : setenv TERM vt100## set DISPLAY environment variable
BUT : Never put any alias it it !
The SHELL
http://www.mhpcc.edu/training/vitecbids/UnixIntro/Shell.html
The .tcshrc project creates a set of configuration scripts for the TCSH
shell. These scripts exploit the most advanced features of tcsh.
http://tcshrc.sourceforge.net/
PATH HOWTO
http://www.ibiblio.org/pub/Linux/docs/HOWTO/mini/other-formats/html_single/Path.html
Search Path Essentials NO NAME NEWSLETTER -- September 1996
http://www.ecn.purdue.edu/ECN/Newsletters/1996.September/Search_Path_Essentials
chelghaf at yahoo.fr or at hotmail.com