# clear history, clear screen and logout
-
-
-#Pwd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)\/\(.*\)\/\(.*\)/...\/\2\/\3\/\4/"; }
-#PWd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)/...\/\2/"; }
-
-
-psg() { ps auxw | grep -i "$@" | grep -v '\(ps auxw\|grep\)'; }
-pswg() { ps auxwww | grep -i "$@" | grep -v '\(ps auxw\|grep\)'; }
-
-# Like pgrep -f
-pidOf() { ps auxwww | grep -i "$@" | grep -v '\(ps auxw\|grep\|pidOf\|KillAll\)' | awk '{print $2}'; }
-
-# A kind of pkill/killall
-KillAll() {
- if [ -z "$1" -o -n "$3" ]; then
- echo "Usage: KillAll [-signal] proc_regexp" >&2
- return 1
- fi
- if [ -z "$2" ]; then
- kill `pidOf "$1"`
- else
- kill "$1" `pidOf "$2"`
- fi
-}
#chlo() { cd; unset HISTFILE; rm -f .sh_history; history -c; clear; logout || exit; }
--- /dev/null
+#! /bin/sh
+
+# A kind of pkill/killall
+if [ -z "$1" -o -n "$3" ]; then
+ echo "Usage: KillAll [-signal] proc_regexp" >&2
+ return 1
+fi
+if [ -z "$2" ]; then
+ kill `pidOf "$1"`
+else
+ kill "$1" `pidOf "$2"`
+fi