From owner-freebsd-doc@FreeBSD.ORG Tue May 15 19:00:17 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73FF71065670 for ; Tue, 15 May 2012 19:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 44C488FC14 for ; Tue, 15 May 2012 19:00:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4FJ0H8R081062 for ; Tue, 15 May 2012 19:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4FJ0HxL081061; Tue, 15 May 2012 19:00:17 GMT (envelope-from gnats) Date: Tue, 15 May 2012 19:00:17 GMT Message-Id: <201205151900.q4FJ0HxL081061@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Warren Block Cc: Subject: Re: docs/167932: [PATCH] examples/csh/dot.cshrc SSH_AUTH_SOCK example incorrect X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Warren Block List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 19:00:17 -0000 The following reply was made to PR docs/167932; it has been noted by GNATS. From: Warren Block To: Guido Falsi Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-doc@freebsd.org Subject: Re: docs/167932: [PATCH] examples/csh/dot.cshrc SSH_AUTH_SOCK example incorrect Date: Tue, 15 May 2012 12:50:26 -0600 (MDT) On Tue, 15 May 2012, Guido Falsi wrote: > It is my personal opinion that sample code should be as correctly > working as possible. > > The simpliest and most legible (used in the attached patch): > > setenv SSH_AUTH_SOCK `sockstat | grep "${USER}" | grep ssh-agent | awk '{ print $6 }'` awk can do a little more to eliminate the second grep: setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk '/ssh-agent/ { print $6 }'` The anchor before and space after the username in the grep are to make it an exact match and not a subset ("jsm" versus "jsmith"). Although I don't know what sockstat does with a username longer than eight characters. > I know this is a minor glitch, but I thought it was worth reporting > anyway. It is. Accuracy and precision are the goal.