Reminds me http://www.ioccc.org :-)
On 10/30/2011 08:04 PM, Sime Ramov wrote:
I've found the following clever ssh-agent stanza in Richard Crowley's `.profile`[https://raw.github.com/rcrowley/home/master/.profile]: which ssh-agent>/dev/null&& { : ${SSH_AUTH_SOCK:=$(echo /tmp/ssh-*/agent.* | cut -d" " -f1)} [ -S "$SSH_AUTH_SOCK" ]&& { export SSH_AUTH_SOCK } || { eval $(ssh-agent) ssh-add } } Wondering why it doesn't work properly in OpenBSD ksh as I am not so good with POSIX sh. It works partially, i.e. it spawns a new agent on every shell invocation.