blob: 64d65210ebd104d5844eb661f9f2f5e539a1e0a5 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/zsh
lastloc=$(tail -n 1 ~/var/local/.location-log)
newloc=$1
if echo $lastloc | fgrep -q $newloc; then
exit 0
fi
printf "%s %-10s %s\n" "$(date -R)" $newloc $SSH_CLIENT[(w)1] >> ~/var/local/.location-log
|