On 15. May 2012, at 20:15 , Eitan Adler wrote: > Author: eadler > Date: Tue May 15 20:15:17 2012 > New Revision: 235481 > URL: http://svn.freebsd.org/changeset/base/235481 > > Log: > Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent > socket path if running > > PR: 167932 > Submitted by: madpilot (pr) > Submitted by: wblock (final patch) > Reviewed by: If someone else reviewed your modification. > Approved by: cperciva (implicit) > MFC after: 3 days > > Modified: > head/share/examples/csh/dot.cshrc > > Modified: head/share/examples/csh/dot.cshrc > ============================================================================== > --- head/share/examples/csh/dot.cshrc Tue May 15 17:21:46 2012 > (r235480) > +++ head/share/examples/csh/dot.cshrc Tue May 15 20:15:17 2012 > (r235481) > @@ -5,7 +5,7 @@ > > # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running > if (${?SSH_AUTH_SOCK} != "1") then > - setenv SSH_AUTH_SOCK `sockstat | grep "${USER}" | cut -d ' ' -f 6` > + setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk '/ssh-agent/ { > print $6 }'`
Wow; how would that handle the 6 different agents I am running? Can you please get rid of that extra call for grep and move it into the awk regex? Would sockstat -u be good enough to limit the output passed through the pipe? > endif > > # Change only root's prompt -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
