Sanjeev Sabhlok's notes on technology, hardware, gardening

An example .cshrc file (very old)

 

#
# Default user .cshrc file (/bin/csh initialization).
 
# Usage:  Copy this file to a user's home directory and edit it to
# customize it to taste.  It is run by csh each time it starts up.
 
# Set up default command search path:
#
# (For security, this default is a minimal set.)
 
set path=( /bin /usr/bin )
 
# Set up C shell environment:
 
if ( $?prompt ) then# shell is interactive.
   set history=20# previous commands to remember.
   set savehist=20# number to save across sessions.
   set system=`hostname`# name of this system.
   set prompt = "$system \!: "# command prompt.
#
# Aliases:
source .alias
if (-e $HOME/.alias) source $HOME/.alias
 
# Personalized Prompt:
# Type1: 
#set prompt="sabhlok@rcf"\(!\):
#Type 2:
#set prompt="${cwd}> "
#alias cd 'chdir \!*; set prompt = "$cwd> "'
 
#Type 3:
# form: [cmd#]cpu:directory>
set cpu=`hostname | awk '{FS = "."; print $1}'` 
# set cpu = computer name
alias sp      set prompt='$cpu\(!\)$cwd\>\ ' 
# set sp to set the prompt
alias cd      'chdir \!* ; sp' 
# redefine cd command
alias pd      'pushd \!* ; sp'
               # redefine pd command
alias pp      'popd \!* ; sp'
               # redefine pp command
sp              # set the prompt
 
# Change Shell:
echo 'NOTE: Before you proceed, type se [backspace]. Then tcsh'
 
# Don't overwrite existing files with the redirection character ">"
set noclobber
 
# Don't create core dump files when a program blows up.
limit coredumpsize 0
 
# Check to see if this is an interactive shell.
# If not, skip the rest of this file.
if ($?USER == 0 || $?prompt == 0) exit
 
## Set C shell variables
# Remember my 40 most recent events
set history=40
 
# Save the most recent 40 events when I log out
set savehist=40
 
# Substitute the filename to be completed when I type an <ESC> at 
# the command line
set filec
 
# create a log of all work done on the screen
 
echo 'when needed, create a log of the screen by typing script'
echo '  '
cal
echo "Today is:   `date`"
echo '  '
echo "You have `ls|wc -l` files in `pwd`"
echo "Type pending to edit pending list"
echo '  '
Print Friendly

sabhlok

View more posts from this author

Leave a Reply

Your email address will not be published. Required fields are marked *