#echo 'Running cshrc file'###################################################### Long, but generic cshrc. Works under tcsh. ## Last Update : 16 Feb 1997 ## By David Krovich, Henry Ware, et. al. ## Still doesn't alway set screen size: use rs to fix# ###################################################### This file is read by a csh on startup. A tcsh will# also read it if there is no .tcshrc available. tcsh# is a extended version of the csh.# setenv is csh's command to set an evironmental variable-# these variables are exported to all children of the shell.# set is a command which sets a variable which is not exported.# alias allows the defining of short cuts. Aliases are a good # place to start customizing. They start at about line 170.# Single and double quotes have distinct meanings in unix # shells, use with caution.# This file should not normally print anything out. It may be # run in any number of circumstances.# more on csh information is available via "man csh".# Set the path to a reasonable set.set path = ("$HOME"/bin \/bin /usr/ucb /usr/bin /usr/sbin \/usr/openwin/bin /usr/openwin \/usr/local/bin /usr/hosts /resolve/resolve/cs16/current \/usr/bin/X11 /usr/local/bin/X11 /usr/lib/X11 /usr/X11/bin \/etc /usr/etc /lib /usr/lib \/usr/local/lib/tex/dvi2ps /usr/local/lib/tex/fonts \ /usr/lib/nis /sbin /usr/sbin /usr/local/games /usr/games \. \)# This next line causes non-interactive shells to stop reading# (They generally inherit everything they need)if ($?prompt == 0) exit ####################################### Source System Files #######################################setenv RC_VERSION 2if ( -x /etc/system.cshrc ) source /etc/system.cshrc;if ( -x /usr/local/system.cshrc ) source /usr/local/system.cshrc ####################################### Set Enviroment Variables (C Shell) ######################################## This next removes the space which is sometimes# in front of $USERsetenv USER $USER# This next is becoming redundantsetenv OPENWINHOME /usr/openwin The path variable tells where in the file system to look for executables associated with commands that have been issued.Comment lines begin with #setenv DEBUG 0 setenv WWWHOME http://www.cs.wvu.edu"$HOME"/public_html/setenv MAIL /usr/spool/mail/$USER# you could set this to some other editor or # to '/usr/local/bin/emacs -nw'setenv EDITOR '/usr/local/bin/emacs'# set this to a printer near yousetenv PRINTER ps748esb#################################### Find locations, not bulletproof ##################################### find out where we are logged insetenv WHERE `uname -n | cut -f1 -d.`# we really need full domain name also...#setenv WHEREFROM `who am i | cut -f2 -d"(" | cut -f1 -d"." | cut -f1 -d")" | cut -f1 -d\! | cut -f2 -d"("`setenv DOMAIN `nslookup $WHERE | grep $WHERE | cut -f2-4 -d. | head -1` setenv MANPATH "$HOME"/man:$OPENWINHOME/man:/usr/local/man:/usr/mansetenv LD_LIBRARY_PATH /usr/lib:/usr/openwin/lib:/lib:/usr/local/lib#echo "You are logged in from $WHEREFROM."# This by itself can cause problemslimit coredumpsize 0 || true# Sets for the shell to make it more friendly. See the man page.set filec -- enables filename completionset notify -- notifies when background processes completeset symlinks=ignoreset hardpathsset duniqueset cdpath=(.)set time=15set history=40set savehist=10set nonomatch# set noclobberset autologout=60#set correct=cmdset ignoreeof -- cant exit via [ctrl d]# mesg n # uncomment to disable talks and writes.# Set Prompts ###set prompt = "${WHERE}:${cwd}- "set promptchars='-#'set prompt = "%/%# "set prompt2 = "%RShell programming:"set prompt3 = "Correct %R? (y|n|e)? " ############################################################## What type of Unix are we running? ############################################################### There should be a less brittle way.../home/hayhurst- nslookup $WHEREServer: names.wvu.eduAddress: 157.182.140.2Name: boole.csee.wvu.eduAddress: 157.182.194.80/home/hayhurst- echo $WWWHOMEhttp://www.cs.wvu.edu/home/hayhurst/public_html/if ( `uname -s` == "SunOS" ) thenif ( "$WHERE" == "h" ) then setenv OSTYPE SunOS elsesetenv OSTYPE Solarisendif else# set to ULTRIX, Linux...setenv OSTYPE `uname -s`endif############################################################## System specific customization ##############################################################switch ($OSTYPE)case "SunOS": if ($TERM == xterm) then unset autologout #echo "Autologout unset .." endif set path=($path \ /usr/5bin /usr/kvm \ /usr/ccs/bin)breakswcase "Solaris": if (($TERM == xterm) || ($TERM == sun-cmd)) then unset autologout #echo "Autologout unset .." endif set path=($HOME/bin/solaris \ /opt/SUNWspro/bin \ /usr/openwin/demo /usr/kvm \ /usr/xpg4/bin \ /usr/ccs/bin $path )breakswcase "ULTRIX":breakswcase "Linux":breakswcase default: echo "Cool! A new machine! Using default settings."breaksw endsw##################--==ALIASES==--###################================## These are csh customized, but are intended to work under tcsh.# "\!*" refers to any arguments to the aliased command# These can references each other, and won't get caught by a recursion.###################General aliases ###################alias copy cpWhen an “aliased command” is issued, the command line is “edited” andThe substitution is made.alias cls clearalias cp 'cp -i'alias dir 'ls -l'alias del rmalias f fingeralias h historyalias help 'echo The Unix help command is man. For example type: man man'alias j jobsalias lo 'clear; logout' -- 2 commands are executed.alias ls 'ls' # or ls -F?alias ll '/bin/ls -l'alias m 'more'alias md mkdiralias mv '/usr/bin/mv -i'alias newpasswd nispasswdalias purge '/bin/rm -f *~ .*~ #*#'#alias p '/bin/rm -f *~ .*~ #*#'alias r rloginalias rename mvalias rm 'rm -i'alias rd rmdiralias term 'echo $TERM'alias t telnetalias update 'source .cshrc; source .login'####################X-Window aliases ####################alias al 'echo $autologout'alias disp 'echo $DISPLAY'# if DISPLAY is set, many programs will assume you are running Xalias nodisp 'unsetenv DISPLAY'alias ual 'unset autologout'######################edit/emacs aliases ######################alias e 'emacs -nw'alias edit 'emacs'# By default emacs will attempt to open a
View Full Document