/ Published in: Bash
Usage: save the script to ~/scripts/my.bashrc and then source it in .bashrc.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#Bash shell startup script by Zemian Deng #Setup: source this file in $HOME/.bashrc with following block #if [ -f ~/scripts/my.bashrc ]; then # . ~/scripts/my.bashrc #fi export SVN_EDITOR=vim export JAVA_HOME=/opt/java export GROOVY_HOME=/opt/groovy export GRAILS_HOME=/opt/grails export MAVEN_HOME=/opt/maven export MAVEN2_HOME=/opt/maven2 export ANT_HOME=/opt/ant export CATALINA_HOME=/opt/tomcat export PATH=$HOME/scripts:\ $JAVA_HOME/bin:\ $GROOVY_HOME/bin:\ $GRAILS_HOME/bin:\ $MAVEN_HOME/bin:\ $MAVEN2_HOME/bin:\ $ANT_HOME/bin:\ $CATALINA_HOME/bin:\ /opt/javautil/bin:\ $PATH # System shell commands alias cp='cp -rvf' alias mv='mv -vf' alias ll='ls -l' alias la='ls -A' alias l='ls -CF' alias f='find . -name' alias s='sort' alias sdate='date +%d-%b-%Y' alias mdate='date +%d-%b-%Y_%H%M' alias ldate='date +%a_%d-%b-%Y_%H%M' alias psg='ps auxwww|grep -v grep | grep' alias hd='od -Ax -tx1z -v' alias printpath='readlink -f' alias tar='tar -vf' alias rsync='rsync -va' alias chmodx='chmod a+x' alias myip='nslookup `hostname`' alias reload='exec bash' # Application specfic commands alias eclipse='/opt/eclipse/eclipse&' alias svnu='svn update' alias svnc='svn ci . -m' alias mvncreate='echo mvn archetype:create -DarchetypeArtifactId=maven-archetype-webapp -DgroupId=cnx -DartifactId=mywebapp' alias mvnc='mvn clean eclipse:clean' alias mvne='mvn eclipse:m2eclipse -Dwtpversion=1.5' alias mysqlr='mysql -u root' alias svns='svn st' alias svnc='svn commit . -m' alias svnu='svn update .' alias svna='$HOME/scripts/svnadd.groovy' alias svnr='$HOME/scripts/svnremove.groovy' alias m='mate' alias mb='mate $HOME/scripts/my.bashrc' alias ms='mate $HOME/scripts' # Platform specific commands alias p='cd ~/Desktop/projects' alias cdopt='cd /opt' alias cdtom='cd /opt/tomcat' alias sshfirebird='ssh root@firebird'