2014-12-30 04:10:12 -05:00
|
|
|
#
|
|
|
|
# /etc/bash.bashrc
|
|
|
|
#
|
|
|
|
|
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
|
|
|
PS1='[\u@\h \W]\$ '
|
|
|
|
PS2='> '
|
|
|
|
PS3='> '
|
|
|
|
PS4='+ '
|
|
|
|
|
|
|
|
case ${TERM} in
|
|
|
|
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
|
|
|
|
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
|
|
|
|
|
|
|
|
;;
|
|
|
|
screen)
|
|
|
|
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
|
|
|
|
|
|
|
|
alias vi='/usr/bin/vim'
|
|
|
|
export EDITOR="vim"
|
|
|
|
|
|
|
|
if [ -f ~/.bashrc ];
|
|
|
|
then
|
|
|
|
source ~/.bashrc
|
|
|
|
fi
|
|
|
|
if [ -d ~/bin ];
|
|
|
|
then
|
|
|
|
export PATH="$PATH:~/bin"
|
|
|
|
fi
|
|
|
|
|
|
|
|
alias grep='grep --color'
|
|
|
|
alias egrep='egrep --color'
|
|
|
|
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
PS1='[\u@\h \W]\$ '
|
|
|
|
|
|
|
|
export HISTTIMEFORMAT="%F %T "
|
|
|
|
export PATH="${PATH}:/sbin:/bin:/usr/sbin"
|
|
|
|
|
2015-01-18 00:06:51 -05:00
|
|
|
DEFROUTEIF=$(ip route show | egrep '^default' | awk '{print $5}')
|
|
|
|
|
2014-12-30 04:10:12 -05:00
|
|
|
echo
|
|
|
|
echo "==================================="
|
|
|
|
date
|
2015-01-18 00:06:51 -05:00
|
|
|
if [ -n "${DEFROUTEIF}" ];
|
|
|
|
then
|
2015-08-05 14:19:34 -04:00
|
|
|
IPADDR=$(ip a s dev ${DEFROUTEIF} | egrep '^[[:space:]]*inet\ ' | awk '{print $2}' | cut -f1 -d"/")
|
2015-08-27 20:57:45 -04:00
|
|
|
HWADDR=$(ip l show dev ${DEFROUTEIF} | egrep '^[[:space:]]*link' | awk '{print $2}')
|
2015-01-18 00:06:51 -05:00
|
|
|
echo
|
2015-08-05 14:19:34 -04:00
|
|
|
echo -n "${DEFROUTEIF} (${HWADDR}) is: ${IPADDR}"
|
2015-01-18 00:06:51 -05:00
|
|
|
fi
|
2014-12-30 04:10:12 -05:00
|
|
|
echo
|
2015-01-18 00:06:51 -05:00
|
|
|
echo -n "tun0 is:"
|
2014-12-30 04:10:12 -05:00
|
|
|
ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}'
|
2015-01-18 00:06:51 -05:00
|
|
|
echo
|
2014-12-30 04:10:12 -05:00
|
|
|
echo "http://bdisk.square-r00t.net/"
|
|
|
|
echo "==================================="
|
|
|
|
echo
|