#	.cshrc_bash - a script file to be shared between csh and bash
#			No mean feat as bash is sh which is quite 
#			different from csh

#	Usage:	At the bottom of .cshrc and .bashrc there will be 
#		commands to invoke this script. Commands will only go in 
#		here if they can be phrased in a compatible way. Other
#		commands will remain in the individual files.

#		I do not propose to try to be optimal. In many cases 
#		commands will exist in the calling script(s) and this 
#		script. Eventually, I may sort that out.

# 28 Jun 2010	Accommodate WEHI.
# 15 Jan 2010	Don't let emacs colourise.
# 12jan07	Try a new man for Linux.
# 11apr05	Other FC2 mods.
# 19mar05	Remove lynx (-color fails on Fedora core 2).
# 20Oct01	Remove lynx (now a function in .kshrc_bash).
#  6Nov00	Remove lpq.
# 15Oct00	Add lynx.
# 21Sep99	Add acroread.
# 26Aug99	Add todo.
#  1Jul99	Add tcg - usual invocation of tcu (tcu +u -g).
# 13Jun99	Add saj.
# 12Jun99	Add catb.
# 16Mar99	Remove infocmp (probably SunOS 4).
# 23Jun98	Add platforms.
#  Henry Grebler    15 May 98  Change nc from alias to function.
# 27Oct97	Add kermserv.
# 13Nov96	Add cad and nc.
# 20Sep96	Remove dircmp - I don't know why it was here.
# 12Jul96	Permit platform-specific aliases.
# 14Mar96	Fix last mod.
# 16Feb96	Insert space in cof and con.
#  9Jan96	Add na.
# 21Aug95	Fix alias errors. Do a better job setting gnutar.
# 29Aug94	This is not the place to set PAGER.
#  4Aug94	Add rcp.
# 29Jul94	Add xtk. Set df, apropos for not SunOS.
# 24May94	Add clear.
# 26Nov93	Modify the ma family. Still at it!
# 26Nov93	Modify the ma family. Do it right.
# 19Nov93	Modify the ma family. There is a bug in Bourne shell:
#		when a command is run asyncronously (with &), stderr
#		disappears.

	alias al alias
	alias lo exit
	alias mansh man.sh
        alias cp 'cp -ip'
        alias rcp 'rcp -p'
        alias mv 'mv -i'
	alias c clear

	alias rs 'rsync -urlptog'

	alias cad 'cat > /dev/null'
	alias catb cat $HOME/Mail/mh_etc/bash_mail_history

	alias em emacs -nw
        alias 5cc /usr/5bin/cc
        alias 5lint lint -I/usr/5include
#        alias infocmp /usr/5bin/infocmp
        alias tic /usr/5bin/tic
	alias todo ed $HOME/help/help_ToDo

	alias abl 'alias | more'

#	alias h source $HOME/scripts/history.source
	alias w pwd
	alias pop cd ..
#23jan93	alias d cd
	alias del rm
	alias dump 'sed -n l'

#	setenv dsdc_today "`date | cut -c5-10`"

	alias saj "lynx 'http://quote.yahoo.com/q?s=SAJ.V&d=t'"
	alias saj4 "lynx 'http://quote.yahoo.com/q?s=SAJ.AL&d=t'"
	alias saj2 "lynx 'http://www.cdnx.ca/Quotes/CompanyInfo.asp?sSymbol=SAJ'"
	alias saj3 "lynx 'http://www.stockmaster.com/exe/sm/chart?Symbol=C:SAJ&UPT=3550'"
	alias ty more

	alias tym more make.log

	alias tylog more $HOME/replay.log
	alias dir ls -la
	alias ed emacs -nw
	alias diff bash $HOME/scripts/diff.sh

	alias dnj $HOME/scripts/dnj.csh
	alias .s cd $HOME/scripts
	alias expire $HOME/scripts/expire.sh
	alias xx source $HOME/scripts/xx.csh
	alias resetty source $HOME/scripts/resetty.source
	alias so source

	alias pri $HOME/scripts/pri.sh
	alias pril $HOME/scripts/prilaser.sh

	alias tp more phant.log
	alias sm ps -uxw

#	alias x $HOME/scripts/wild.csh
	alias x $HOME/scripts/expr.sh

	alias rst 'cd $save_directory'
	alias hed $HOME/scripts/hed.sh
	alias hmg more $HOME/hmg/help
	alias hmgu more $HOME/bna_utils/doc/Unisys.tips
	alias dmo more $HOME/clients/acus/DMO

	alias mph less $HOME/hmg/phone
	alias sphone more $HOME/doc/procedures/phone.agenda
	alias a cd
	alias dm ls -lat /var/spool/mail/
	alias srm $HOME/mail/send_registered_mail.sh
	alias srmail srm
	alias cleanup $HOME/scripts/cleanup.sh
	alias ufddel 'rm -rf ./* .??*'	# ./* guards against files like --xyz--
	alias sus source $HOME/scripts/Uts_setup
	alias wy 'setenv TERM wyse60; setenv KBTERM wyse60; setenv SCTERM wyse60-t27'
	alias vt 'setenv TERM vt100; setenv KBTERM vt220; setenv SCTERM vt100; unsetenv TERMCAP'
	alias gt 'env | grep TERM'
	alias p pushd
	alias tdt more ~/doc/procedures/to.do.today
	alias etdt emacs -nw ~/doc/procedures/to.do.today

	alias sol $HOME/scripts/sol.sh
	alias xt $HOME/scripts/xterm.sh
	alias xtr $HOME/scripts/xterm.sh -r
	alias xts $HOME/scripts/xterm.sh -s
	alias xtrs $HOME/scripts/xterm.sh -s -r
	alias xtsr $HOME/scripts/xterm.sh -s -r
	alias xth 'xterm -sb -g 80x36+220+100 -T "Henry''s on hp" -fn t27_ -e "telnet optimhp" &'
	alias xtk $HOME/scripts/xterm_ksh.sh
	alias xtx "$HOME/scripts/xterm.sh -h hmg"
#	alias cof 'touch $HOME/hmg/Bundy/`date +%y%m%d%H%M`F'
#	alias con 'touch $HOME/hmg/Bundy/`date +%y%m%d%H%M`N'
	alias cof 'echo `date "+%y%m%d %H%M"`F >> $HOME/hmg/times/Bundy'
	alias con 'echo `date "+%y%m%d %H%M"`N >> $HOME/hmg/times/Bundy'

	alias tcu $HOME/scripts/tarcompressuuencode.sh
	alias tcg "$HOME/scripts/tarcompressuuencode.sh +u -g"
	alias uut $HOME/scripts/uudecodeuncompresstar.sh
	alias uue $HOME/scripts/uuencode.sh
	alias lok 'sleep 1;xset s activate'	# FC5
#	alias lok xlock -allowroot -nice 19 -font t27_
	alias ttf tar -tvf /dev/fd0	#tar-toc-floppy
	alias txf tar -xvf /dev/fd0	#tar-eXtract-floppy
	alias gnutar `$HOME/.ENV./set_gnutar.sh`

	alias kermit $HOME/scripts/kermit.sh
	alias kerm $HOME/scripts/kermit.sh
	alias kermserv '/usr/local/bin/kermit -y $HOME/kermit/.kermrc_server'
	alias kgf '(cd ~/GandF/kermit;$HOME/scripts/kermit.sh)'
	alias krah '(cd ~/clients/rah/kermit;$HOME/scripts/kermit.sh)'
	alias wgf '(cd ~/GandF/kermit;$HOME/pc/kermit/wermit -y ./.kermrc)'
	alias wrah '(cd ~/clients/rah/kermit;$HOME/pc/kermit/wermit -y ./.kermrc)'
	alias wrah2 '$HOME/pc/kermit/wermit -y $HOME/clients/rah/kermit/.kermrc'
	alias werm $HOME/scripts/wermit.sh

#	aliases to keep logs of makes

	alias ma 'echo Now means mand; $HOME/scripts/makelog.bash $*'
	alias mad '$HOME/scripts/makelog.bash debug $*'
	alias mand '$HOME/scripts/makelog.bash $*'
	alias go '$HOME/scripts/go'

#31jul93	alias ww 'ps -auxw | grep root | grep xterm | cut -c57-'
	alias ww 'ps -auxw | grep xterm | cut -c57-'
	alias lns '$HOME/scripts/lns.sh'
	alias rml '$HOME/scripts/rmlinks.sh'
	alias xfile '$HOME/magic/file.sh'

	alias gzip gzip -v 
	alias gunzip gzip -vd
	alias gcat gunzip -vdc
	alias key '$HOME/scripts/gsckey.sh'

	alias   xr $HOME/scripts/xrenamewindow.sh

# Let's try to keep them in alpha order:

	alias acroread acroread -geometry 800x898+152-0
	alias na 'niscat.sh aliases | grep'
	alias platforms "grep -v '^#' /usr/local/helix/platforms | grep -v '^$' | awk '{print \$1}' | sort | uniq"

	alias xd "date '+%a %d %b %Y %H:%M:%S %z %Z';\
			date '+%A %d %B %Y %H:%M:%S %z %Z';\
			date '+%a %e %b %Y %H:%M:%S %z %Z';\
			date '+%A %e %B %Y %H:%M:%S %z %Z';\
			date '+%Y%b%d.%H:%M:%S';
			date '+%d %b %y'"


#---------------------------------------------------------------------------
#	A section only to be performed if on a particular platform

setenv temp ~/.ENV./.shells_rc.`uname`
setenv TEST_VALUE `sh -c 'if [ -r $temp ]; then echo 0; else echo 1;fi'`
IF	source $temp

unsetenv temp TEST_VALUE

#---------------------------------------------------------------------------
#	As long as I work on UTS

	echo Setting up for UTS
	source $HOME/scripts/Uts_setup
