Latest articles:

~/.bashrc

aus der Kategorie Shell

Meine aktuelle bashrc:
export VERSION=".bashrc Version 1.20"

if [ -e  /etc/os-release ]; then
    if [ -n "$(grep Gentoo /etc/os-release)" ] ; then
        alias upd='sudo emerge --sync ; sudo emerge -uavDN --keep-going=y world '
    elif [ -n "$(grep Arch /etc/os-release)" ] ; then
        alias upd='trizen -Suy'
    else
        alias upd='sudo apt-get update; sudo apt-get upgrade; sudo apt-get dist-upgrade'
    fi
else
    alias upd='sudo apt-get update; sudo apt-get upgrade; sudo apt-get dist-upgrade'
fi

if [[ $- != *i* ]] ; then
	# Shell is non-interactive.  Be done now!
	return
fi

[[ -f /etc/profile.d/bash-completion.sh ]] && source /etc/profile.d/bash-completion.sh

if [ $(whoami) = "root" ] ; then
    PS1="\[\033[1;31m\]Local Time: [\t]\n\[\033[1;32m\]<=\[\033[1;34m\]\u\[\033[1;32m\]@\H:\w =>"
else
    PS1="\[\033[1;31m\]Local Time: [\t]\n\[\033[1;32m\]<=\u@\H:\w =>"
fi
export SYSTEMD_EDITOR=vim

PATH=$PATH:$HOME/bin:$HOME/.local/bin
export SVN_EDITOR=vim
export PATH
alias updateBash="pscp -v -l root -h hosts.conf $HOME/.bashrc /root/ ; \
    pscp -v  -h hosts.conf $HOME/.bashrc /home/airmack/ ; \
    mkdir -p /tmp/pssh; \
    pssh -o /tmp/pssh/ -v -l root -h hosts.conf 'echo $VERSION'; \
    echo 'root:'; \
    cat /tmp/pssh/*; \
    pssh -o /tmp/pssh/ -v -h hosts.conf 'echo $VERSION'; \
    echo 'airmack:'; \
    cat /tmp/pssh/*;
"

alias q='exit'
alias rm='rm -i'
alias ls='ls --color'
alias lsh='ls -lah --color'
alias pdf='mupdf'
alias ..='cd ..'
alias web80='sudo python -m http.server 80'
alias web='python -m http.server'
alias wget='wget'
alias aria2c='screen aria2c -j2'
alias ret='gpg --keyserver pool.sks-keyservers.net --recv-keys'
alias ser='gpg --keyserver pool.sks-keyservers.net --search-key'
alias mmc='sudo mount /dev/mmcblk0p1 /home/airmack/usb'
alias cp='cp -v'
alias make='make -j9'
alias cclang='CC=/usr/bin/clang CXX=/usr/bin/clang++ ccmake'
alias mocp='screen mocp'
alias gd="git diff --color"

##congress
#/home/airmack/ccc/next/next.py

hzgf. am 20. Oktober 2011