| 1 | if [ -z "$PS1" ]; then
|
|---|
| 2 | return
|
|---|
| 3 | fi
|
|---|
| 4 |
|
|---|
| 5 | # bogus
|
|---|
| 6 | if [ -f /unix ] ; then
|
|---|
| 7 | alias ls='/bin/ls -CF'
|
|---|
| 8 | else
|
|---|
| 9 | alias ls='/bin/ls -F'
|
|---|
| 10 | fi
|
|---|
| 11 | alias ll='ls -l'
|
|---|
| 12 | alias dir='ls -ba'
|
|---|
| 13 |
|
|---|
| 14 | alias ss="ps -aux"
|
|---|
| 15 | alias dot='ls .[a-zA-Z0-9_]*'
|
|---|
| 16 | alias news="xterm -g 80x45 -e trn -e -S1 -N &"
|
|---|
| 17 |
|
|---|
| 18 | alias c="clear"
|
|---|
| 19 | alias m="more"
|
|---|
| 20 | alias j="jobs"
|
|---|
| 21 |
|
|---|
| 22 | # common misspellings
|
|---|
| 23 | alias mroe=more
|
|---|
| 24 | alias pdw=pwd
|
|---|
| 25 |
|
|---|
| 26 | hash -p /usr/bin/mail mail
|
|---|
| 27 |
|
|---|
| 28 | if [ -z "$HOST" ] ; then
|
|---|
| 29 | export HOST=${HOSTNAME}
|
|---|
| 30 | fi
|
|---|
| 31 |
|
|---|
| 32 | HISTIGNORE="[ ]*:&:bg:fg"
|
|---|
| 33 |
|
|---|
| 34 | psgrep()
|
|---|
| 35 | {
|
|---|
| 36 | ps -aux | grep $1 | grep -v grep
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | #
|
|---|
| 40 | # This is a little like `zap' from Kernighan and Pike
|
|---|
| 41 | #
|
|---|
| 42 |
|
|---|
| 43 | pskill()
|
|---|
| 44 | {
|
|---|
| 45 | local pid
|
|---|
| 46 |
|
|---|
| 47 | pid=$(ps -ax | grep $1 | grep -v grep | awk '{ print $1 }')
|
|---|
| 48 | echo -n "killing $1 (process $pid)..."
|
|---|
| 49 | kill -9 $pid
|
|---|
| 50 | echo "slaughtered."
|
|---|
|
|---|