Added great ssh ip checker

This commit is contained in:
Austen Adler 2016-09-20 13:23:08 -04:00
parent aeefdd48b9
commit c19ac375e7
No known key found for this signature in database
GPG Key ID: 7ECEE590CCDFE3F1

View File

@ -70,3 +70,17 @@ fi
if [ "$1" = "paste" ]; then if [ "$1" = "paste" ]; then
DISPLAY=:0.0 xdotool type --clearmodifiers --file <(xsel) DISPLAY=:0.0 xdotool type --clearmodifiers --file <(xsel)
fi fi
if [ "$1" = "ip" ]; then
shift
local RET=0
if [ "$(hostname)" = "MMLin" ]; then
if grep -q "$1" < <(ifconfig enp2s0f0); then
RET=1
fi
elif [ "$(hostname)" = "G2" ]; then
if grep -q "$1" < <(ifconfig enp1s0;ifconfig wlp2s0); then
RET=1
fi
fi
echo $RET
fi