aboutsummaryrefslogtreecommitdiffstats
path: root/examples/startup-files/bashrc
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1996-08-26 18:22:31 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:49 +0000
commit726f63884db0132f01745f1fb4465e6621088ccf (patch)
tree6c2f7765a890a97e0e513cb539df43283a8f7c4d /examples/startup-files/bashrc
downloadandroid_external_bash-726f63884db0132f01745f1fb4465e6621088ccf.tar.gz
android_external_bash-726f63884db0132f01745f1fb4465e6621088ccf.tar.bz2
android_external_bash-726f63884db0132f01745f1fb4465e6621088ccf.zip
Imported from ../bash-1.14.7.tar.gz.
Diffstat (limited to 'examples/startup-files/bashrc')
-rw-r--r--examples/startup-files/bashrc139
1 files changed, 139 insertions, 0 deletions
diff --git a/examples/startup-files/bashrc b/examples/startup-files/bashrc
new file mode 100644
index 0000000..5363e58
--- /dev/null
+++ b/examples/startup-files/bashrc
@@ -0,0 +1,139 @@
+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