[ale] guickie presentations---ALE NWers

David S. Jackson deepbsd at earthlink.net
Wed May 22 14:07:45 EDT 2002


On Tue, May 21, 2002 at 10:09:05PM -0400 Dow Hurst <dhurst at kennesaw.edu> wrote:
> I think is it appropriate and a great idea.  Just had a request for a 
> shell tutorial from one of the ALE NW'lers a few minutes ago.
> Dow

One nice thing for a shell tutorial might be for people to cough up
their favorite functions on a separate thread on this list.  We could,
say, post our .bashrc's or .profile's or whereever we like to keep our
functions, aliases, and variables.  I'll include mine for old time sake.  

Another idea along the shell tutorial idea might be for everyone to
run the following command and share it with the class:

history 1000 | tr -s " " | cut -d " " -f3- | sort | uniq -c |sort -r |
less

Or something equivalent.  That way folks could see what commands (with
which switches) we use the most.  And then explain any special features.
How's that?

Here's my history...


  55 ls
  17 getpic.sh 			# a simple webcam script
  11 telnet catbox
  11 fortune -e freebsd-tips    # run fortune program, give tips
  11 cd				# return to home directory
  10 exit
   7 sudo killall junkbuster	# junkbuster is a web proxy
   6 sudo /usr/local/sbin/junkbuster /usr/local/etc/junkbuster/configfile&
   5 webcamscript.sh 		# another webcam script...
   5 sudo vim configfile	# this is the config file for junkbuster
   5 ps ax|grep xmms
   5 ls image*pnm
   5 ls image*
   4 vim bin/getpic.sh 
   4 sh newscript 		# another way of launching a script
   4 ps ax|grep nets
   4 ps ax|grep junk
   4 ls -l
   4 ls *pnm				# pnm files are graphic files
   4 latex junkbuster.tex		# latex is a text processer suite
   4 gphoto2 -h		# gphoto2 is a commandline tool for dig. cameras
   4 cd projects/
   4 cd /usr/local/etc/junkbuster/
   4 cd ..
   4 cd -		# cd - will return you to your previous dir
   3 vim notes/passwds
   3 vim getpic.sh 
   3 ping www.google.com
   3 man vice
   3 ls *png
   3 less blockfile
   3 gphoto2 -D
   3 file image.png
   3 crontab -e		# edit your crontab.  Man crontab
   3 cd notes
   2 xv picture.png 	# xv is a terrific graphical file viewer
   2 w3m README.html 	# w3m is a great textual web browser
   2 vim webcam.cgi
   2 vim index.html 
   2 vim getpic.sh
   2 sudo vim cookiefile
   2 sudo vim blockfile
   2 sudo echo		# I do this sometimes so sudo won't ask me again
   2 rm picture.png 
   2 rm image001.pnm 
   2 rm image.png
   2 ps ax|grep junkbuster
   2 pnmtopng image002.pnm > picture.png	# convert pnms to pngs
   2 man gphoto2
   2 man fortune
   2 man bcd
   2 ls /usr/local/bin/*core
   2 locate games|less
   2 locate doom|less
   2 less passwds
   2 less cookiefile
   2 less configfile.sample 
   2 less configfile
   2 kill -9 39066	# really kill this process.  
   2 gphoto2 --list-cameras|less
   2 gphoto2 --capture-image
   2 dvi2tty -o junkbuster.txt junkbuster.dvi  # convert dvi to text file
   2 cd ~/public_html/webcam
   2 cd setiathome
   2 cd bin
   2 cd /usr/ports/games
   2 bin/checkhosts.pl 
   2 bcd		# I think this is a typo  :-)
   1 xv picture.png
   1 xv image002.png
   1 xv image001.pnm
   1 xv *.png
   1 xkill 
   1 xdvi junkbuster.dvi 
   1 xdoom
   1 x64		# Commodore 64 emulator for X
   1 whois deepbsd.net
   1 whois deepbsd.com
   1 which xrubik	# 'which' finds path to executable
   1 which xrobots
   1 which xqf
   1 which vice
   1 which mahjongg
   1 wc -w simplefun.tex 	# wc can count words, lines, etc.
   1 wc -w junkbuster.txt
   1 wc -w junkbuster.tex
   1 w3m README
   1 vim ~/bin/webcamscript.sh 
   1 vim simplefun.tex
   1 vim sigsnag 
   1 vim sigmake
   1 vim newscript 
   1 vim junkbuster.tex
   1 vim index.html
   1 vim beyondbsd.txt
   1 vim WebCam.java 
   1 vim /home/dsj/bin/checkhosts.pl 
   1 unzip raid_on_bungeling_bay.zip 
   1 tail -f messages		# this is a game for x64  :-)
   1 tail -f /var/log/maillog	# tail -f ouputs continuous logfile etc
   1 sudo vim /etc/group
   1 sudo rm /usr/local/libexec/doom/xdoom.core
   1 sudo make install
   1 sudo kill -9 39066
   1 sudo doom
   1 sudo /usr/local/sbin/junkbuster /usr/local/etc/junkbuster/configfile
   1 su root -c "kill -9 39066"	# this is on a bsd box, different on linux
   1 su -c "kill -9 39066"
   1 ssh scee
   1 ssh dixie
   1 sorthis.sh 
   1 scp junkbuster.txt dsj at scee:.
   1 rm image001.pnm picture.png 
   1 rm image.pnm
   1 rm image.png 
   1 rm cookies
   1 rm beyondbsd.txt 
   1 rm *pnm
   1 rm *png
   1 rm *core
   1 ps ax|grep gkrell
   1 ps aux|grep junk
   1 pnmtopng image002.pnm > image002.png
   1 pnmtopng image002.pnm 
   1 pnmtopng image001.pnm > picture.png
   1 pnmtopng image001.pnm
   1 pnmtopng image*pnm
   1 ping www.mozilla.org	# testing for icmp filters...
   1 ping www.ibm.com
   1 ping lbreakout.sourceforge.net
   1 ping juno			# testing localnet connectivity
   1 ping dixie
   1 ping catbox
   1 mv webcamscript.sh ~/bin
   1 mv newscript webcamscript.sh
   1 mkdir ~/public_html/webcam1
   1 mkdir images/images21
   1 man pnmtopng
   1 man ls
   1 man junkbuster
   1 man fping
   1 man dmesg.boot	# little different on my bsd box here.
   1 man cfscores
   1 man canfield
   1 ls vice/doc	# vice is the name of the commodore 64 suite
   1 ls vice
   1 ls public_html/image*pnm
   1 ls image.png
   1 ls image*png
   1 ls image*.png
   1 ls image*.pn*
   1 ls image* | grep -v /
   1 ls image | grep -v /
   1 ls image
   1 ls dev
   1 ls VICE
   1 ls /usr/local/bin/*dore
   1 ls /usr/games/*core
   1 ls -C|less
   1 ls $HOME/*png
   1 locate xrubik
   1 locate webcam
   1 locate vice|less
   1 locate vice
   1 locate vicd
   1 locate rubik
   1 locate raid
   1 locate gphoto2|grep ports		# looking for bsd ports...
   1 locate games|grep ^k
   1 locate games|grep \^k
   1 locate doom
   1 locate cookiefile
   1 locate chess|less
   1 locate bungling
   1 locate bsdgames
   1 locate amavis
   1 locate ^k|less
   1 locate WineX
   1 less trustfile
   1 less raid_on_bungeling_bay.d64 
   1 less aclfile
   1 less /var/run/dmesg.boot 
   1 less /usr/ports/security/amavis-perl/pkg-descr
   1 less /usr/ports/games/glchess/pkg-descr
   1 less /usr/local/office52/share/bookmark/english/Fun&More/webcam.url
   1 less /mnt/usr1/var/db/pkg/kdegames-i18n-1.1.2/+CONTENTS
   1 less +CONTENTS
   1 less '+CONTENTS'
   1 krubik
   1 killall xmms
   1 killall junkbuster
   1 kill -9 39065 39066
   1 kill -9 35858 35859 35860
   1 kill -9 32897 32898 32899
   1 history 1000 | tr -s " " | cut -d " " -f3- | sort | uniq -c |sort -r | less
   1 history 1000 | tr -s " " | cut -d " " -f3- | sort | uniq -c |sort -r > myhistory.txt
   1 his
   1 grep scee /etc/hosts	# what's scee's ip?
   1 grep peanut /etc/hosts	# what's peanut's ip?
   1 grep ov511 usb.c
   1 grep ov511 *
   1 grep history ~/bin/sorthis.sh 
   1 grep classmates notes/passwds
   1 grep class passwds
   1 grep class notes/passwds
   1 gphoto2 -p 2
   1 gphoto2 -D && gphoto2 --capture-image && gphoto2 --get-all-files && pnmtopng image001.pnm && xv image001.png
   1 gphoto2 -D && gphoto2 --capture-image && gphoto2 --get-all-files
   1 gphoto2 --stdout --capture-image | pnmtopng > image.png
   1 gphoto2 --list-files
   1 gphoto2 --list-cameras
   1 gphoto2 --help
   1 gphoto2 --display-abilities
   1 gphoto2 --capture-image --stdout | pnmtopng | image.png
   1 gphoto2 --capture-image --stdout | pnmtopng > image.png
   1 gphoto2 --capture-image --stdout > image.pnm
   1 gphoto2 --capture-image && (gphoto2 -P|pnmtopng > image.png)
   1 gphoto2 --abilities --camera 'IOMagic MagicImage 400'
   1 gphoto2 --abilities 'IOMagic MagicImage 400'
   1 gphoto2 --abilities
   1 getpic.sh
   1 fortune freebsd-timps
   1 fortune -m freebsd-tips
   1 file raid_on_bungeling_bay.d64 
   1 file images.png
   1 file image.pnm
   1 file image*pnm
   1 env LANG=C gphoto2 --debug --capture-image
   1 doom
   1 dmesg.boot
   1 df
   1 cp picture2.png generic.png
   1 cp generic.png picture.png
   1 cp * ~/public_html/webcam1/.
   1 chmod 755 newscript 
   1 chmod 755 getpic.sh 
   1 cd ~/public_html/webcam1
   1 cd ~/commodore/
   1 cd ~/bin
   1 cd ~/apps/jwebcam
   1 cd ~/apps
   1 cd usb
   1 cd sys
   1 cd pkg
   1 cd otes		# typo
   1 cd netscape.core 	# another typo...
   1 cd kdegames-*
   1 cd dev/usb
   1 cd db
   1 cd commodore/
   1 cd apps/vice-1.6
   1 cd /var/log
   1 cd /usr/src
   1 cd /usr/share/games/fortune
   1 cd /usr/local/lib
   1 cd /usr/games
   1 cd /usr/apps
   1 cd /mnt/usr1/var/db/pkg
   1 cd /mnt/usr1
   1 cd .netscape/
   1 cd ../projects/
   1 cd 
   1 cat image.pnm
   1 cat > sydney.txt
   1 cat +CONTENTS|less
   1 canfield
   1 atc
   1 /usr/local/sbin/junkbuster /usr/local/etc/junkbuster/configfile&
   1 ./setiathome -email -nice 20&
   1 ./perlseti view		# neat tool for checking seti stats
   1 


-- 
David S. Jackson                        dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
He asked me if I knew what time it was -- I said yes,
but not right now.  -- Steven Wright


# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files for examples

### Aliases
alias vimb='vim ~/.bashrc'
alias sbsh='source ~/.bashrc'


# If running interactively, then:
if [ "$PS1" ]; then

    # enable color support of ls and also add handy aliases

    eval `dircolors`
    alias ls='ls --color=auto '
    #alias ll='ls -l'
    #alias la='ls -A'
    #alias l='ls -CF'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'

    # set a fancy prompt

    PS1='[\u@\h:`basename $(tty)` \w]$ '
fi


ct(){

theme=""

choices="snazzy timely friendly usual debian slack freebsd"

echo -e "$choices\nWhich theme today? "
read theme

case $theme in

  snazzy ) export PS1='--[`uname -sr`]--(`date +"%c"`)--<\n[\u@\h \w] \$ '
	;;
  timely ) export PS1='--(`date +"%A %B %d %Y"`)--(`date +"%T"`)--\n[\u@\h:`basename $(tty)` \w] \$ ' 
	;;
  friendly ) export PS1='== Hi Dave! Welcome to `hostname -f` ==(`date +"%r"`)==\n[tty:`basename $(tty)` \w]\$ '
	;;
  debian ) export PS1='`echo $0 $BASH_VERSION`>\$ '
	;;
  slack ) export PS1='--( Got Slack? )--(`date +"%r"`)--\n[\u@\h \w]\$ '
	;;
  * ) export PS1='[\u@\h:`basename $(tty)` \w] \$ '
	;;
esac

}


#	$Id: dot.shrc,v 1.1 1997/08/03 18:37:46 wosch Exp $
#
# .shrc - bourne shell startup file 
#
# This file will be used if the shell is invoked for interactive use and
# the environment variable ENV is set to this file.
#
# see also sh(1), environ(7).
#


# file permissions: rwxr-xr-x
#
# umask	022

# Uncomment next line to enable the builtin emacs(1) command line editor
# in sh(1), e.g. C-a -> beginning-of-line.
set -o vi


#  Source the profile file if it exists
if [ -e ~/.bash_profile ]; then
  . ~/.bash_profile 
fi

# some useful variables
gla=/usr/home/dsj/GNUstep/Library/AfterStep
ul=/usr/local
ulb=/usr/local/bin
uls=/usr/local/src
ull=/usr/local/library
pkgdb=/var/db/pkg


# some useful aliases
alias h='fc -l'
alias j=jobs
alias m=$PAGER
alias ll='ls -laGFo'
alias l='ls -lG'
alias ls='colorls -G'
alias g='egrep -i'
alias vimb='vim $HOME/.bashrc'
alias sbsh='source $HOME/.bashrc'
 
# # be paranoid
# alias cp='cp -ip'
# alias mv='mv -i'
# alias rm='rm -i'

### Local variables

#export TERM=cons25

# # set prompt: ``username at hostname$ '' 
#PS1="`whoami`@`hostname | sed 's/\..*//'`"
PS1="[\u@\h \w]$ "
#case `id -u` in
# 	0) PS1="${PS1}# ";;
# 	*) PS1="${PS1}$ ";;
#esac

# search path for cd(1)
# CDPATH=.:$HOME


### Put some functions in here when I get the chance.


# .bashrc


############################
# Source global definitions
############################
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi


###################################################
#        User specific aliases and variables
###################################################

#alias xiterm='xiterm -pixmap ~/GNUstep/Library/AfterStep/desktop/buttons/nature_term.xpm'
alias ls='ls --color=tty'
alias cls='clear'
alias whois='/usr/local/bin/whois'
alias cdl='cd /usr/local/'
alias cdlb='cd /usr/local/bin/'
alias cdls='cd /usr/local/src/'
alias cdll='cd /usr/local/lib/'
alias cdx='cd /usr/X11R6/lib/X11/'
#alias gvim='gvim -bg black -fg white'
alias nem='emacs -nw'
alias bh='less ~/.bash-help'
alias nemb='nem ~/.bashrc'
alias sbsh='source ~/.bashrc'
alias xclock='xclock -d -update 1'
alias cds='cd $HOME/src'
alias cda='cd $HOME/GNUstep/Library/AfterStep'
alias cdw='cd $HOME/GNUstep/Library/WindowMaker'
alias vimb='vim $HOME/.bashrc'
alias ltoh='latex2html -address dsj at dsj.net -dir /home/dsj/projects/html -info 0 -no_navigation -html_version 3.2'  
alias fixfont='setfont default8x16'
alias compose='/home/dsj/bin/compose'
alias addressbook='addressbook -f /home/dsj/addresses.dat'
#alias irc='irc -l pv/pv.irc'
alias xwp='/usr/local/share/WordPerfect/wpbin/xwp'
alias xmmshelp='zless /usr/doc/xmms/README.gz'
alias cddb="cd /home/dsj/apps/CDDB_get-1.61/; ./cddb.pl"
alias traceroute="/usr/sbin/traceroute"
alias pg='ps ax|grep $1'

audiodir=/mnt/audio
rhh=/mnt/rh-home/dsj
rhr=/mnt/rh-root
gla=$HOME/GNUstep/Library/AfterStep
glw=$HOME/GNUstep/Library/WindowMaker
gld=$HOME/GNUstep/Defaults
bb=$HOME/blackbox
bbs=$HOME/blackbox/styles
bbt=$HOME/blackbox/themeballs
pixback=/home/dsj/GNUstep/Library/AfterStep/backgrounds/Wave.xpm
pixdir=$HOME/pics/ours
brc=$HOME/.bashrc
pkgdb=/var/cache/apt/archives
p=$HOME/projects
b=$HOME/bin
per=$HOME/personal
ul=/usr/local
ulb=/usr/local/bin
uls=/usr/local/src
ull=/usr/local/lib
htmldir=$HOME/public_html
waddir=/usr/local/share/games/doom

# For libsndfile
#export SNDLIB=/usr/local/lib/libsndfile
#export LIBSNDFILE=/usr/local/bin/sndfile_info

## For BB Stock Pro
export BB_HOME=$HOME/bb3.3
export PATH=$PATH:$BB_HOME/bin

###########################
#Some useful functions here
###########################

#   Window Manager Selection function

# Note, you can either use the sed one liner with the echo statement,
# or you can call the menuparse.pl script to display the WM menu.
# If you uncomment the echo and sed script, comment the eval
# statement.

wim()
{
WMCHOICE=""         # initialize to zero
clear

echo -e "           Your Window Managers:  \n\n"
sed -n 's/) cmd=.*#/)  /p' $HOME/.xsession

#eval ~/bin/menuparse.pl

echo -e "\n\nWhat is your desired Window Manager? " 
read WMCHOICE
export WMCHOICE
startx

}

##  The qtsetup function resets the manpath.  Fix with this func.

fixman()
{
unset MANPATH
}

###  This runs the series of perlscripts for WMHeadlines.

wmnews()
{
~/wmheadlines/wmbenews.pl -forceupdate
echo "got Be News..."
~/wmheadlines/wmbeoscentral.pl -forceupdate
echo "got BeOS Central..."
~/wmheadlines/wmfreshmeat.pl -forceupdate
echo "got Freshmeat..."
~/wmheadlines/wmlinuxtoday.pl -forceupdate
echo "got Linux Today..."
~/wmheadlines/wmmattshouse.pl -forceupdate
echo "got Matt's House..."
~/wmheadlines/wmsegfault.pl -forceupdate
echo "got Segfault..."
~/wmheadlines/wmslashdot.pl -forceupdate
echo -e "got Slashdot...all done!\n"
}


# Here are some bashprompt themes

bp()
{
clear; echo -e "\n                 Bash Prompt Themes: \n blue, combo, cyan, elite, elite2, fire, green, \nmagenta, red, redhat, suse, white, yellow, friendly, spiffy  \n\n" 
read pchoice

case "$pchoice" in 
  blue) PS1="\[\033[34;44;1m\]\333\262\261\260\[\033[37;44;1m\]\u@\h\[\033[0m\]\[\033[34;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P) \n\[\033[34;40;1m\]\w \[\033[0m\]\$ "
       PS2="\[\033[34;40m\]\333\262\261\260\[\033[0m\]>"  
  ;;
  combo) PS1="\[\033[01;34;01m\]\333\262\261\260\[\033[01;37;44m\]\u@\h\[\033[00;34;40m\]\260\261\262\333\[\033[00;34;40m\]\333\262\261\260\[\033[01;37;40m\] \d \$(date +%I:%M:%S%P)\n\[\033[01;33;40m\]$PWD>\[\033[00m\] " 
         PS2="\[\033[01;34;01m\]\333\262\261\260\[\033[00;34;40m\]\260\261\262\333\[\033[00;34;40m\]\333\262\261\260\[\033[01;01;34m\]>\[\033[00m\] "
  ;;
  cyan) PS1="\[\033[36;46;1m\]\333\262\261\260\[\033[37;46;1m\]\u@\h\[\033[0m\033[36;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P) \n\[\033[36;40;1m\]\w/\[\033[0m\] " 
        PS2="\[\033[36;40m\]\333\262\261\260\[\033[0m\]>"
  ;;
  elite) PS1="\[\033[31m\]\332\304\[\033[34m\](\[\033[31m\]\u\[\033[34m\]@\[\033[31m\]\h\[\033[34m\])\[\033[31m\]-\[\033[34m\](\[\033[31m\]\$(date +%I:%M%P)\[\033[34m\]-:-\[\033[31m\]\$(date +%m)\[\033[34m\033[31m\]/\$(date +%d)\[\033[34m\])\[\033[31m\]\304-\[\033[34m]\\371\[\033[31m\]-\371\371\[\033[34m\]\372\n\[\033[31m\]\300\304\[\033[34m\](\[\033[31m\]\W\[\033[34m\])\[\033[31m\]\304\371\[\033[34m\]\372\[\033[00m\]" 

         PS2="> "
  ;;
  elite2) local GRAD1=`tty|cut -d/ -f3`
          local COLOR1="\[\033[0;36m\]"
          local COLOR2="\[\033[1;36m\]"
          local COLOR3="\[\033[1;30m\]"
          local COLOR4="\[\033[0m\]"
          PS1="$COLOR3Ú$COLOR1Ä$COLOR2($COLOR1\u$COLOR3@$COLOR1\h$COLOR2)$COLOR1Ä$COLOR2($COLOR1\#$COLOR3/$COLOR1$GRAD1$COLOR2)$COLOR1Ä$COLOR2($COLOR1\$(date +%I:%M%P)$COLOR3:$COLOR1\$(date +%m/%d/%y)$COLOR2)$COLOR1Ä$COLOR3-$COLOR4\n$COLOR3À$COLOR1Ä$COLOR2($COLOR1\$$COLOR3:$COLOR1\w$COLOR2)$COLOR1Ä$COLOR3-$COLOR4 "
          PS2="$COLOR2Ä$COLOR1Ä$COLOR3-$COLOR4 " 
  ;;
  fire)  local GRAD1='\[\333\262\261\260\]'
         local GRAD2='\[\260\261\262\333\]'
         local COLOR1='\[\033[01;33;43m\]'
         local COLOR2='\[\033[01;37;43m\]'
         local COLOR3='\[\033[00;31;43m\]'
         local COLOR4='\[\033[00;31;40m\]'
         local COLOR5='\[\033[01;33;40m\]'
         local COLOR6='\[\033[01;37;40m\]'
         local GRAD0='\[\033[00m\]'

         PS1=$COLOR1$GRAD1$COLOR2'\u@\h'$COLOR3$GRAD2$COLOR4$GRAD1\ $COLOR6' \d \$(date +%I:%M:%S%P) '$NONE'\n'$COLOR5'\w/'$GRAD0' ' 
         PS2=$COLOR1$GRAD1$COLOR3$GRAD2$COLOR4$GRAD1$COLOR5'>'$GRAD0' '
  ;;
  green)  PS1="\[\033[32;42;1m\]\333\262\261\260\[\033[37;42;1m\]\u@\h\[\033[0m\033[32;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P) \n\[\033[32;40;1m\]\w/\[\033[0m\] " 
          PS2="\[\033[32;40m\]\333\262\261\260\[\033[0m\]>"
  ;;
  magenta) PS1="\[\033[35;45;1m\]\333\262\261\260\[\033[37;45;1m\]\u@\h\[\033[0m\033[35;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P) \n\[\033[35;40;1m\]\w/\[\033[0m\] " 
           PS2="\[\033[35;40m\]\333\262\261\260\[\033[0m\]>"
  ;;
  red) PS1="\[\033[31;41;1m\]\333\262\261\260\[\033[37;41;1m\]\u@\h\[\033[0m\033[31;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P)\n\[\033[31;40;1m\]\w/\[\033[0m\] " 
       PS2="\[\033[31;40m\]\333\262\261\260\[\033[0m\]>"
  ;;
  redhat)  PS1="[\u@\h \W]\\$ "
           PS2="> "
  ;;
  suse)   PS1="\u@\h:\w/ > "
          PS2="> "
  ;;
  white)  PS1="\[\033[37;47;1m\]\333\262\261\260\[\033[37;47;1m\]\u@\h\[\033[0m\033[37;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P) \n\[\033[37;40;1m\]\w/\[\033[0m\] " 
          PS2="\[\033[37;40m\]\333\262\261\260\[\033[0m\]>"
  ;;
  yellow) PS1="\[\033[33;43;1m\]\333\262\261\260\[\033[37;43;1m\]\u@\h\[\033[0m\033[33;40m\]\333\262\261\260\[\033[37;40;1m\] \d \$(date +%I:%M:%S%P)\n\[\033[33;40;1m\]\w/\[\033[0m\] " 
          PS2="\[\033[33;40m\]\333\262\261\260\[\033[0m\]>"
  ;;
  friendly)  PS1="Time: \d \t  Hi \u@\h You are in -> \w \n Cmd: \# His: \!]\$ "
  ;;
  spiffy)  PS1="\[\033[1;35m\] \$(sd) \[\033[1;31m\] \u@\h \[\033[1;36m\] c: \#  h: \!  \n\[\033[1;32m\] \w ]\$ \[\033[0m\] " 
  ;;
  *)  echo -e "\nPlease type your answer exactly as it appears in the menu above.  \n\n"
  ;;
esac

export PS1 PS2

}



#History function
his()
{
history ${1:-22}
}

# Shorten up my latex2html commands
l2h()
{
title=$2
sourcedoc=/home/dsj/projects/$1
l2hcmd="latex2html -address dsj at dsj.net -t $2 -dir /home/dsj/projects/html -no_navigation -html_version 3.2"

eval "$l2hcmd $sourcedoc"
}

#Install a *.tar.gz archive in the current directory
inst(){
gzip -dc $1 | tar xvf -
}

#List the contents of a zip archive
cz(){
unzip -l $*
}

#List the contents of a *.tar.gz archive
ctgz() 
{
for file in $* ; do
gzip -dc ${file} | tar tf -
done
}

#Create a *.tgz archive a la zip
tgz()
{
name=$1 ; tar -cvf $1 ; shift
tar -rf ${name} $*
gzip -S .tgz ${name}
}

#Create a tar.gz ball of name $1 from $2
tarc()
{
tar czvf $1.tar.gz $2
}

#Move a directory across file systems using tar
tarm()
{
source=$1
dest=$2
cd $source
tar cf - . | (cd $dest; tar xvf -)
}

##########################################
#  Set up local environment variables
##########################################
#---Qt Libraries

qtsetup()
{
QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
if [ $MANPATH ] 
then
  MANPATH=$QTDIR/man:$MANPATH
else
  MANPATH=$QTDIR/man
fi
if [ $LD_LIBRARY_PATH ] 
then
  LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
else 
  LD_LIBRARY_PATH=$QTDIR/lib
fi
LIBRARY_PATH=$LD_LIBRARY_PATH
if [ $CPLUS_INCLUDE_PATH ] 
then
  CPLUS_INCLUDE_PATH=$QTDIR/include:$CPLUS_INCLUDE_PATH
else 
  CPLUS_INCLUDE_PATH=$QTDIR/include
fi

export QTDIR PATH MANPATH LD_LIBRARY_PATH LIBRARY_PATH
export CPLUS_INCLUDE_PATH
}

#---PPC_* variables help the free pascal compiler work---#
#PPC_EXEC_PATH=/usr/bin
#PPC_GCCLIB_PATH=/usr/lib/gcc-lib/i386-linux/2.7.2.1
#PPC_CONFIG_PATH=/etc
#PPC_ERROR_FILE=/usr/lib/fpc/0.99.5/msg/errore.msg
#---Xaccounting application help files and data location---#
#XACC_HELP=/usr/local/share/xacc/Docs
#XACC_DATA=/home/dsj/xacc/data

#---PATH----#
PATH=$PATH:~/bin:/usr/local/games:/usr/local/bin

#---PERSONAL STUFF----#
MYCOL="http://www.computoredge.com/sandiego/Editorial/idon'tdo.htm"
alias mycol='lynx $MYCOL'

#---WindowManager for GNOME---#
#WINDOW_MANAGER=/usr/local/bin/afterstep

#---MANPATH---#
#MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man

#---PGP Stuff---#
PGPPATH=$HOME/.pgp
#PGP_SYSTEM_DIR=/var/lib/pgp
#---IRC Stuff---#
IRC_SERVERS_FILE="~/.servers"
IRCNICK="dsj"
IRCNAME="David S. Jackson <dsj at dsj.net>"
IRCFINGER="Just exactly what more about me do you want to know???
Don't you know it's not polite to finger people without their
consent?"
DALNET="209.149.255.20:6667"
EFNET="209.127.0.67:6667"
DEBIAN="204.209.161.5:6667"
#---To add the LIBG and GTK stuff in /usr/local/lib-------#
LD_LIBRARY_PATH=/usr/local/lib

#---The Usual Stuff---#
# PS1="Time: \d \t  Hi \u@\h You are in -> \w \n Cmd: \# His: \!]\$ "
PS1="[\u@\h \W]\\$ "
PS2=">"
TMP=$HOME/tmp
FAXNUMBERS="$HOME/.tkhylafax/rolodex"
FAXALIASES="$HOME/.tkhylafax/aliases"
EDITOR='vim'
WHOIS_SERVER=whois.geektools.com
WIS=whois.geektools.com
NNTPSERVER=news.atlnet.com
TERM=xterm-color
export MAXHOME="$HOME/apps/maxwell-0.5.3"
export MOZILLA_HOME=/usr/lib/netscape
export NPX_PLUGIN_PATH=$HOME/.netscape/plugins:/usr/local/java/jre1.3.1_01/plugin/i386/ns4
export QTDIR=/usr/local/qt
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
MAILCHECK=60
MAILPATH='/
/var/spool/mail/dsj?You have mail in $_:\
$HOME/inbox/admin/root?You have mail for root.'

export LC_ALL TMP NNTPSERVER PGPPATH TERM NPX_PLUGIN_PATH MOZILLA_HOME MAILPATH MAILCHECK EDITOR PPC_EXEC_PATH PPC_GCCLIB_PATH PPC_CONFIG_PATH PPC_ERROR_FILE XACC_HELP XACC_DATA MANPATH FAXNUMBERS FAXALIASES


# The following line is for use by the bashprompt program
#. /home/dsj/.bashprompt/functions/bashprompt.function
# There will also be a line below that starts with callbashprompt

#callbashprompt fire



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.




More information about the Ale mailing list