I have a shell script which I would like to do one thing if the user is physically using the computer, and one thing if the user is logged in via SSH.
How would I go about doing that?
In more specific terms, my normal machine is OS X, and there I want to use a OS X graphical editor (BBEdit) as my EDITOR. However, if I'm SSHing into my Mac from my netbook, I want to use vim - I don't have a graphical connection to my Mac.
Thanks!