Date: Wed, 16 May 2012 00:23:14 +0000 From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: Eitan Adler <eadler@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235481 - head/share/examples/csh Message-ID: <14EB5CAF-03DF-4D64-9707-A8129F02DB23@lists.zabbadoz.net> In-Reply-To: <201205152015.q4FKFHob003642@svn.freebsd.org>
index | next in thread | previous in thread | raw e-mail
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!home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14EB5CAF-03DF-4D64-9707-A8129F02DB23>
