blob: 0e1af8989ec6ee13fe37f9a5649af38e6cb84b8e (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/zsh
lastloc=$(tail -n 1 ~/var/log/location)
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/log/location
|