export JAVA_HOME=/usr/java/jdk1.5.0_09
export ANT_HOME=/home/oracle/apache-ant-1.7.0
export PATH=$PATH:${JAVA_HOME}/bin:${ANT_HOME}/bin
export CLASSPATH=./:${JAVA_HOME}/lib/tools.jar:${JAVA_HOME}/lib/rt.jar:${ANT_HOME}/lib/ant.jar
#!/usr/bin/env bash
curtime=`date +"%s"`
#Your bash script statements here
echo "Time of execution is `expr $(date +'%s') - $curtime` seconds"
$EDITOR=emacs
$VISUAL=emacs
$export EDITOR VISUAL
who | tee who_output | sort
m4 -DNAME=Kris -DAGE=31 myfile
logname : current login name
whoami : same as logname except if su is used to switch user
finger : user information
last : last login details
printenv : environment details
scp myfile otherid@remote.example.com:/home/otherhome/
Put the following in .profile or .bashrc file
PS1="`hostname`*\${ORACLE_SID}-\${PWD}
----execute other commands even change directory
Vi editor tips:
ESC :%s/foo/bar/g