tweak to bashrc

This commit is contained in:
brent s. 2015-01-18 00:06:51 -05:00
parent 0162513827
commit 3a5914faca

View File

@ -43,15 +43,21 @@ PS1='[\u@\h \W]\$ '
export HISTTIMEFORMAT="%F %T " export HISTTIMEFORMAT="%F %T "
export PATH="${PATH}:/sbin:/bin:/usr/sbin" export PATH="${PATH}:/sbin:/bin:/usr/sbin"


DEFROUTEIF=$(ip route show | egrep '^default' | awk '{print $5}')

echo echo
echo "===================================" echo "==================================="
date date
if [ -n "${DEFROUTEIF}" ];
then
echo echo
echo "eth0 is:" echo -n "${DEFROUTEIF} is: "
ifconfig eth0 | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}' ifconfig "${DEFROUTEIF}" | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}'
fi
echo echo
echo "tun0 is:" echo -n "tun0 is:"
ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}' ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}'
echo
echo "http://bdisk.square-r00t.net/" echo "http://bdisk.square-r00t.net/"
echo "===================================" echo "==================================="
echo echo