Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # .bashrc
- pathmunge () {
- if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
- if [ "$2" = "after" ] ; then
- PATH=$PATH:$1
- else
- PATH=$1:$PATH
- fi
- fi
- }
- setWindowTitle() {
- echo -ne "\e]2;$*\a"
- }
- updateWindowTitle() {
- setWindowTitle "$USER@${HOSTNAME%%.*}:${PWD/$HOME/~}"
- }
- #better autocomplete
- if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
- . /etc/bash_completion
- fi
- ## beep
- xset b off
- #Make Bash append rather than overwrite the history on disk:
- shopt -s histappend
- #Whenever displaying the prompt, write the previous line to disk:
- #PROMPT_COMMAND='history -a'
- #A new shell gets the history lines from all previous shells
- PROMPT_COMMAND='history -a; updateWindowTitle'
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\h\[\033[01;34m\] \W \\$\[\033[00m\] '
- eval `dircolors -b $HOME/.mycolors`
- export TERM=xterm;
- PERL5LIB=${PERL5LIB}:${HOME}/Setups/ensembl_API/src/bioperl-live
- PERL5LIB=${PERL5LIB}:${HOME}/Setups/ensembl_API/src/ensembl/modules
- PERL5LIB=${PERL5LIB}:${HOME}/Setups/ensembl_API/src/ensembl-compara/modules
- PERL5LIB=${PERL5LIB}:${HOME}/Setups/ensembl_API/src/ensembl-variation/modules
- PERL5LIB=${PERL5LIB}:${HOME}/Setups/ensembl_API/src/ensembl-functgenomics/modules
- export PERL5LIB="$HOME/Setups/PfamScan/:$HOME/.cpan/build/:$HOME/scripts:$PERL5LIB"
- export HISTCONTROL=ignoredups
- export HISTSIZE=9999
- export HISTFILESIZE=999999
- export HISTFILE="$HOME/.bash_history"
- export EDITOR='/usr/bin/emacs';
- pathmunge /home/terdon/bin
- pathmunge /home/terdon/scripts
- pathmunge /home/terdon/research/data/python
- pathmunge /home/terdon/Setups/PfamScan
- pathmunge /usr/sbin
- pathmunge /usr/local/sbin
- pathmunge /sbin
- alias eog='eom'
- alias gping='ping www.google.com'
- alias nocolor='sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g"'
- alias ls='ls --color=tty'
- alias kls='ls'
- alias sls='ls'
- alias dir='dir --color=yes'
- alias l='ls -lh'
- alias la='ls -a'
- alias cl='clear; ls'
- alias ..='cd ..'
- alias ...='cd ../../'
- alias mroe='more'
- alias m='more'
- alias ll='less -R'
- alias c='clear'
- alias rmr='rm -r'
- alias wtf='apropos'
- alias sl="ls"
- alias geneid2fasta='perl -ne "print unless /^#/ || /gene/ || /^\s+$/ || /\d/; print if /^>/;"'
- alias sru='sort -u'
- alias src='sort -u | wc -l'
- alias grprint='html2text $1'
- alias aterm='aterm -sl 10000'
- alias grep='grep --color'
- alias gerp='grep'
- alias clean_latex='rm .mtc .aux *.log *.bbl *.blg *.glo *.idx *.ilg *.ind *.maf *.out *.toc */.mtc* /.aux /.log /.bbl /.blg /.glo /.idx /.ilg /.ind /.maf /.out *.toc'
- function multi7z () {
- for n in $@; do 7zr x $n; done
- }
- function pdfconcat () { gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/dev/stdout "$@" ;}
- function bigdiff() {
- for ((i=1; i<=$len; i++)); do
- #echo "i:$i $len";
- a=`gawk -v num=$i 'NR==num{print; exit}' $1`;
- b=`gawk -v num=$i 'NR==num{print; exit}' $2`;
- if [ "$a" != "$b" ];
- then
- echo -e "> $a\n< $b";
- fi;
- done
- }
- function netnames() {
- if [ $1 ]; then
- gawk '{print $1"\n"$2}' $1 | sort -u
- else
- echo -e "NETNAMES: Prints the unique names in a.gr file.\n\nUSAGE: netnames NET.gr"
- fi
- }
Add Comment
Please, Sign In to add comment