$ if [ "${SSH_CLIENT%% *}" == "ipaddr" ]; then command; fiPlace in ~/.bashrc
If you login to a ssh server from different ips, sometimes you want to do something specific for each.
e.g., quickly go into screen -x session from a phone, but not your desktop.
by David Winterbottom (codeinthehole.com)
from All commands http://ift.tt/1AN7tnL
No comments:
Post a Comment