Update of /cvsroot/winbash/winbash/examples/startup-files
In directory usw-pr-cvs1:/tmp/cvs-serv6262/examples/startup-files
Added Files:
Bash_aliases Bash_profile Bashrc bash-profile
Log Message:
Major realignment to 1.14.7
--- NEW FILE: Bash_aliases ---
# Some useful aliases.
alias texclean='rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky'
alias clean='echo -n "Really clean this directory?";
read yorn;
if test "$yorn" = "y"; then
rm -f \#* *~ .*~ *.bak .*.bak *.tmp .*.tmp core a.out;
echo "Cleaned.";
else
echo "Not cleaned.";
fi'
alias h='history'
alias j="jobs -l"
alias l="ls -l "
alias ll="ls -l"
alias ls="ls -F"
alias term='set noglob; eval `tset -Q -s `'
alias pu="pushd"
alias po="popd"
#
# Csh compatability:
#
alias unsetenv=unset
function setenv () {
export $1="$2"
}
# Function which adds an alias to the current shell and to
# the ~/.bash_aliases file.
add-alias ()
{
local name=$1 value="$2"
echo alias $name=\'$value\' >>~/.bash_aliases
eval alias $name=\'$value\'
alias $name
}
# "repeat" command. Like:
#
# repeat 10 echo foo
repeat ()
{
local count="$1" i;
shift;
for i in $(seq 1 "$count");
do
eval "$@";
done
}
# Subfunction needed by `repeat'.
seq ()
{
local lower upper output;
lower=$1 upper=$2;
while [ $lower -le $upper ];
do
output="$output $lower";
lower=$[ $lower + 1 ];
done;
echo $output
}
--- NEW FILE: Bash_profile ---
# Startup file for bash login shells.
#
default_dir=/usr/local/lib/
if [ "$PS1" ]; then
PS1='\u@\h(\#)$ '
ignoreeof=3
fi
LOGIN_SHELL=true
# If the user has her own init file, then use that one, else use the
# canonical one.
if [ -f ~/.bashrc ]; then
source ~/.bashrc
else if [ -f ${default_dir}Bashrc ]; then
source ${default_dir}Bashrc;
fi
fi
--- NEW FILE: Bashrc ---
if [ "$PS1" != "" ] ; then
if [ -f /unix ] ; then
alias ls='/bin/ls -CF'
alias ll='/bin/ls -lCF'
alias dir='/bin/ls -bCalF'
else
alias ls='/bin/ls -F'
alias ll='/bin/ls -lF'
alias dir='/bin/ls -balF'
fi
alias ss="ps -aux"
alias mail=/usr/ucb/mail
alias dot='ls .[a-zA-Z0-9]*'
alias mroe=more
alias pwd='echo $PWD'
alias pdw='echo $PWD'
alias news="xterm -g 80x45 -e rn -e &"
alias back='cd $OLDPWD'
alias manroff="nroff /usr/lib/tmac/tmac.an.4.3"
alias laser="lpr -Palw2"
alias lw="lpr -Palw2"
alias c="clear"
alias m="more"
alias j="jobs"
if [ -z "$HOST" ] ; then
export HOST=`hostname`
fi
history_control=ignoredups
psgrep()
{
ps -aux | grep $1 | grep -v grep
}
#
# This is a little like `zap' from Kernighan and Pike
#
pskill()
{
local pid
pid=$(ps -ax | grep $1 | grep -v grep | awk '{ print $1 }')
echo -n "killing $1 (process $pid)..."
kill -9 $pid
echo "slaughtered."
}
term()
{
TERM=$1
export TERM
tset
}
cd()
{
builtin cd $*
xtitle $HOST: $PWD
}
bold()
{
tput smso
}
unbold()
{
tput rmso
}
if [ -f /unix ] ; then
clear()
{
tput clear
}
fi
rot13()
{
if [ $# = 0 ] ; then
tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]"
else
tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" < $1
fi
}
watch()
{
if [ $# -ne 1 ] ; then
tail -f nohup.out
else
tail -f $1
fi
}
#
# Remote login passing all 8 bits (so meta key will work)
#
rl()
{
rlogin $* -8
}
function setenv()
{
if [ $# -ne 2 ] ; then
echo "setenv: Too few arguments"
else
export $1="$2"
fi
}
function chmog()
{
if [ $# -ne 4 ] ; then
echo "usage: chmog mode owner group file"
return 1
else
chmod $1 $4
chown $2 $4
chgrp $3 $4
fi
}
#
# Source kshenv for ksh-compatibility definitions
#
if [ -f ~/.kshenv ] ; then
. ~/.kshenv
fi
fi
#end of .bashrc
--- NEW FILE: bash-profile ---
HOME=/usr/homes/chet
MAIL=/usr/homes/chet/mbox
MAILCHECK=30
HISTFILE=/usr/homes/chet/.history
MACHINE=$(/usr/local/bin/machine)
HOST=$(hostname)
PATH1=/usr/homes/chet/bin.$MACHINE:/usr/local/bin/gnu:
PATH2=/usr/local/bin:/usr/ucb:/bin:/usr/bin/X11:.
PATH3=/usr/andrew/bin:/usr/bin:/usr/ibm:/usr/local/bin/mh:/usr/new/bin:
PATH=$PATH1:$PATH2:$PATH3
EDITOR=/usr/homes/chet/bin.$MACHINE/ce
VISUAL=/usr/homes/chet/bin.$MACHINE/ce
FCEDIT=/usr/homes/chet/bin.$MACHINE/ce
if [ "$BASH" ] ; then
SHELL=$BASH
else
SHELL=/bin/bash
fi
if [ "$MACHINE" = "ibm032" ] ; then
stty erase ^H
fi
PAGER=/usr/ucb/more
NNTPSERVER=kiwi
NS=/nfs/cwjcc/fs1/ns-engr/proj/netsrv/cwpub/proto/src
#
# Bogus 1003.2 variables. This should really be in /etc/profile
#
LOGNAME=${USER-$(whoami)}
TZ=EST5EDT
export HOME ENV VISUAL EDITOR MAIL SHELL PATH TERM
export PAGER LESS TERMCAP HISTSZIE HISTFILE
export MAIL MAILCHECK HOST HOSTNAME NNTPSERVER NS LOGNAME TZ
PS1="${HOST}$ "
PS2='> '
export PS1 PS2
umask 022
if [ -f /unix ] ; then
stty intr ^c
fi
if [ -f ~/.bashrc ] ; then
. ~/.bashrc
fi
|