From joshua@green.shallow.net  Sun Mar 31 19:50:27 2002
Return-Path: <joshua@green.shallow.net>
Received: from green.shallow.net (c16486.smelb1.vic.optusnet.com.au [210.49.224.105])
	by hub.freebsd.org (Postfix) with ESMTP id 978E637B416
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 31 Mar 2002 19:50:26 -0800 (PST)
Received: by green.shallow.net (Postfix, from userid 1001)
	id 138C83E2C; Mon,  1 Apr 2002 13:50:25 +1000 (EST)
Message-Id: <20020401035025.138C83E2C@green.shallow.net>
Date: Mon,  1 Apr 2002 13:50:25 +1000 (EST)
From: Joshua Goodall <joshua@roughtrade.net>
Reply-To: Joshua Goodall <joshua@roughtrade.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: find.1 should encourage users to DTRT when piping to xargs
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36602
>Category:       docs
>Synopsis:       find.1 should encourage users to DTRT when piping to xargs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 31 20:00:04 PST 2002
>Closed-Date:    Fri Apr 12 09:19:29 PDT 2002
>Last-Modified:  Fri Apr 12 09:19:29 PDT 2002
>Originator:     Joshua Goodall
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD green.shallow.net 4.5-STABLE FreeBSD 4.5-STABLE #2: Sat Mar 30 12:55:07 EST 2002 joshua@green.shallow.net:/usr/obj/usr/src/sys/GREEN i386


>Description:

find.1 describes the -X option, great, but doesn't give the
DTRT solution, that is, using -print0 and then xargs -0 on the
other side of the pipe.

>How-To-Repeat:

>Fix:

Index: find.1
===================================================================
RCS file: /cvs/src/usr.bin/find/find.1,v
retrieving revision 1.41
diff -u -r1.41 find.1
--- find.1	20 Nov 2001 15:45:29 -0000	1.41
+++ find.1	1 Apr 2002 03:29:30 -0000
@@ -117,6 +117,12 @@
 quotes, backslash
 .Pq Dq Li \e ,
 space, tab and newline characters.
+.Pp
+However, you may wish to consider the
+.Fl print0
+primary in conjunction with
+.Ql xargs -0
+as an effective alternative.
 .It Fl d
 The
 .Fl d
>Release-Note:
>Audit-Trail:

From: swear@blarg.net (Gary W. Swearingen)
To: Joshua Goodall <joshua@roughtrade.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: docs/36602: find.1 should encourage users to DTRT when piping to xargs
Date: 01 Apr 2002 00:18:51 -0800

 You might want to also slip xargs(1) into the "See Also" section before
 someone writes a PR on it.  Its seems to be common (but debated)
 practice to Also See all of the commands mentioned in other sections.

From: Joshua Goodall <joshua@roughtrade.net>
To: docs@freebsd.org
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: docs/36602: find.1 should encourage users to DTRT when piping to xargs
Date: Mon, 1 Apr 2002 19:54:28 +1000

 On Mon, Apr 01, 2002 at 12:18:51AM -0800, Gary W. Swearingen wrote:
 > You might want to also slip xargs(1) into the "See Also" section before
 > someone writes a PR on it.  Its seems to be common (but debated)
 > practice to Also See all of the commands mentioned in other sections.
 
 indeed. xargs is relevant to find in any case; find | xargs is
 a common pattern.
 
 Index: find.1
 ===================================================================
 RCS file: /cvs/src/usr.bin/find/find.1,v
 retrieving revision 1.41
 diff -u -r1.41 find.1
 --- find.1	20 Nov 2001 15:45:29 -0000	1.41
 +++ find.1	1 Apr 2002 09:47:38 -0000
 @@ -117,6 +117,12 @@
  quotes, backslash
  .Pq Dq Li \e ,
  space, tab and newline characters.
 +.Pp
 +However, you may wish to consider the
 +.Fl print0
 +primary in conjunction with
 +.Ql xargs -0
 +as an effective alternative.
  .It Fl d
  The
  .Fl d
 @@ -732,6 +738,7 @@
  .Xr locate 1 ,
  .Xr whereis 1 ,
  .Xr which 1 ,
 +.Xr xargs 1 ,
  .Xr stat 2 ,
  .Xr fts 3 ,
  .Xr getgrent 3 ,
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Wed Apr 10 09:39:47 PDT 2002 
State-Changed-Why:  
Applied to CURRENT, I'll apply to STABLE in 2 days, thanks for the submission! 


Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Wed Apr 10 09:39:47 PDT 2002 
Responsible-Changed-Why:  
Applied to CURRENT, I'll apply to STABLE in 2 days, thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36602 
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Fri Apr 12 09:18:37 PDT 2002 
State-Changed-Why:  
Patched in STABLE, thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36602 
>Unformatted:
