Re^2: Diff between set and setenv - here's the whole bunch
Maarten Litmaath
maart at cs.vu.nl
Thu Apr 27 08:41:13 AEST 1989
barmar at think.COM (Barry Margolin) writes:
\Note that if you work in a networked environment it may be necessary
\to put just about everything into .cshrc. If you use rsh to execute
\commands on other hosts, only the .cshrc will be run, and not the
\.login.
Excerpts from my .cshrc and .login follow.
------------------------------------------------------------
# .cshrc
cd
if (! $?HOST) source ._login
# some aliases
if (! $?prompt) exit
set cdpath = (~ ~/src/l)
set history = 50
set ignoreeof
set notify
set b = $cwd
if ($?TTY) then
if ($TERM != sun || $TTY != /dev/console || `tty` == $TTY) exit
endif
setenv TTY `tty`
switch ($TERM)
case sun:
set prompt = "`esc`[7m$HOST`esc`[m> "
breaksw
# etc.
endsw
------------------------------------------------------------
# ._login
umask 022
setenv bin ~/bin/`set b={/usr,}/bin/arc[h]; $b[1]`
setenv PATH $bin\:$HOME/bin/sh:/bin:/usr/bin:/usr/ucb:/usr/local/bin
setenv PATH "$PATH":/etc:/usr/etc:.
setenv EXINIT "se ai aw dir=$HOME/tmp sh=/bin/sh sm|map `ctrl C` :\!cc % "
setenv EXINIT "$EXINIT|map `ctrl A` :\!make "
setenv HOST `hostname | sed "s/\..*//"`
# etc.
if (! $?prompt) exit
if (! $?TERM) setenv TERM dumb
switch ($TERM)
case a230:
unesc '^[|I2^[J^Y^[|J2^Z^Y^[|K2^[K^Y^[.8^[.2^[w^[l^[R'
mesg n
breaksw
# etc.
endsw
# etc.
------------------------------------------------------------
# .login
if ($TERM != sun || $TTY != /dev/console) exit
# etc.
suntools
# etc.
--
"If it isn't aesthetically pleasing, |Maarten Litmaath @ VU Amsterdam:
it's probably wrong." (jim at bilpin). |maart at cs.vu.nl, mcvax!botter!maart
More information about the Comp.unix.questions
mailing list