#!/bin/bash #.bashrc ### Promt in different colors, Examples: #PS1='\u@h:\w > ' #PS1='\n\t\n\u: \[\e[01;34m\]\W\[\e[0m\] > ' #PS1='\[\e]2;\u@\H \w\a \n\[\e[01;30m\]\h: \[\e[01;34m\]\w \[\e[0m\] > ' PS1='\[\e]0;\h:\w\a\]\n\[\e[01;30m\]\h:\[\e[34m\]\w\n\[\e[00;32m\]\u\[\e[0m\] > ' export PS1 export TERM=linux export DISPLAY=127.0.0.1:0.0 #Path to find execuables: export PATH=./:$PATH:/c/WINDOWS #Path to look in when changing directory! #YES, you don't have to be in that particular directory, when changing to frequently used directories: export CDPATH=.:~:/usr/local/:/DATA/Projects # Set the size of the history list. export HISTSIZE=200 #Read the contents of the history file and use them as the current history. history -r ######################################################################## # User specific aliases and functions alias s='source ~/.bashrc' alias df='df -h' alias du='du -hk' alias ..='cd ..' alias ...='cd ../..' # Misc :) alias less='less -r' # raw control characters alias grep='grep --color' # show differences in colour # Some shortcuts for different directory listings alias ls='/bin/ls -Xhp --color=auto' # classify files in colour alias dir='/bin/ls -1' # SEE: /etc/DIR_COLORS alias vdir='ls --color=auto --format=long' #alias ll='ls -l' # long list alias ll='clear;pwd;/bin/ls -oXh --color=auto' alias la='ls -A' # all but . and .. alias l='ls -CF' # alias lsd='ls -la | grep drwx' #list only directories ################################################################## #privat alias xterm='xterm -T $USER@$USERDOMAIN -sk -sb' alias xh='xhost +' alias mv='mv -i' alias RM='/bin/rm' #alias rm 'mv \!* /data1/Wueste/TRASH ' alias x='chmod u+x' alias xall='chmod a+rwx' #Start Xserver in the background alias X='XWin -multiwindow -clipboard -nowinkill -logverbose 0 &' # open file with the default windows application # see man cygstart for more information alias open='cygstart' ############################################################ alias host1='myssh hostname1.com wueste' alias host2='myssh hostname2.com wueste' alias host3='myssh hostname3.com wueste' myssh (){ #assumes that the checkX-package is installed!! echo -e "\n\n***** Conntecting to \e[01;33m$1\e[0m as \e[32m$2\e[0m..." if checkX.exe ; then echo -e "\e[31m X-server already running \e[0m" xhost +$1 ssh $1 -Y -l $2 else echo -e "\e[31m starting X-server...\e[0m" X echo "\e[31m \n\n Local X-server started...\e[0m" xhost +$1 ssh $1 -Y -l $2 fi echo -e "\e[31m******Welcome back on \e[01;33m$HOSTNAME \e[0m" } PROG="$(cygpath -u "$(cygpath -m -s "${PROGRAMFILES}")")" ############################################################# edit (){ $PROG/Notepad++/notepad++.exe $2 "`cygpath -w $1`" & #second argument, e.g. -n150 opens file at lineNumber 150 } ############################################################# # COMPUTER DOMAIN SPECIFIC SETTINGS ############################################################# alias gs=$PROG/gs/gs8.51/bin/gswin32.exe alias gv=$PROG/ghost/GhostView/gsview/gsview32.exe alias psmerge='echo "USAGE: gs -sDEVICE=[e]pswrite -sOutputFile=output.[e]ps -dNOPAUSE -dBATCH file1.ps file2.ps' ####################################################### # MATLAB export MATLAB=$PROG/MATLAB/R2006a/bin/win32/MATLAB.exe alias matlab=$PROG'/MATLAB/R2006a/bin/win32/MATLAB.exe -nojvm -nosplash ' #export PATH=$PATH:/c/Programme/MATLAB/R2006a/bin/win32 ####################################### # SAC export SACBASE=/usr/local/sac export SACAUX=$SACBASE/winaux #export SAC_DISPLAY_COPYRIGHT=0 export SAC_USE_DATABASE=0 alias sac='$SACBASE/bin/sac.exe /home/wueste/sac.ini' alias SAC='$SACBASE/sac/bin/sac.exe' ####################################### # taup export TAUP_HOME=/Soft/TauP-1.1.7 export PATH=$PATH:${TAUP_HOME}/bin # Calling java from within CYGWIN actually starts the Windows version. We therefor need the DOS-compatible path names! # Anoyingly, the path-separator backslashes have to be escaped, i.e. a single backslash replaced by a double one. Also, the semi-colon in CLASSPATH have to be escaped BASE=`cygpath -wp $TAUP_HOME/lib/ | sed 's/\\\\/\\\\\\\\/g'` #export CLASSPATH=`echo -e $BASE'log4j-1.2.8.jar\;'$BASE'seisFile-1.0.1.jar\;'$BASE'TauP-1.1.7.jar'` ####################################### # Rayinver and RayGUI export PATH=/Soft/rayguidir/bin/:$PATH alias xrayinvr='/Soft/rayguidir/bin/xrayinv.exe' #export CLASSPATH='/Soft/rayguidir/raygui/RayGui.class' alias raygui='unset CLASSPATH; cd /Soft/rayguidir/raygui/; java RayGui' #---------------------------------------------------------- ############################################################# #GMT #export NETCDFHOME=/Soft/netcdf-3.6.1 #export GMTHOME=/Soft/GMT4.1.4 #export PATH=$PATH:$GMTHOME/bin export NETCDFHOME=/Soft/netcdf-3.6.2 export GMTHOME=/Soft/GMT/GMT4.2.1 export GMT_DATADIR=/DATA export GMT_GRIDDIR=/DATA/Grids export PATH=$PATH:$GMTHOME/bin export MANPATH=$GMTHOME/man:$MANPATH alias gmtdoc='cygstart "`cygpath -w ${GMTHOME}/www/gmt/doc/html/GMT.html`"' ################################################# # show mount table mount --change-cygdrive-prefix / mount