From rhh@ipass.net Thu Apr  1 15:56:34 1999
Return-Path: <rhh@ipass.net>
Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5])
	by hub.freebsd.org (Postfix) with ESMTP id 06B08155BF
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 Apr 1999 15:55:58 -0800 (PST)
	(envelope-from rhh@ipass.net)
Received: from stealth.dummynet. (ts10-204-ppp.ipass.net [208.209.104.204])
	by pluto.ipass.net (8.9.1a/8.9.1) with ESMTP id SAA18309;
	Thu, 1 Apr 1999 18:55:14 -0500 (EST)
Received: (from rhh@localhost)
	by stealth.dummynet. (8.9.1/8.8.8) id SAA05429;
	Thu, 1 Apr 1999 18:55:43 -0500 (EST)
	(envelope-from rhh)
Message-Id: <199904012355.SAA05429@stealth.dummynet.>
Date: Thu, 1 Apr 1999 18:55:43 -0500 (EST)
From: Randall Hopper <aa8vb@ipass.net>
Sender: rhh@ipass.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: aa8vb@ipass.net
Subject: "xargs" parsing bug
X-Send-Pr-Version: 3.2

>Number:         10914
>Category:       bin
>Synopsis:       "xargs" parsing bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr  1 16:00:00 PST 1999
>Closed-Date:    Sun May 23 08:59:27 PDT 1999
>Last-Modified:  Sun May 23 08:59:52 PDT 1999
>Originator:     Randall Hopper
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
self
>Environment:

	Stock 3.0-RELEASE

>Description:

This cmd works fine on Solaris, Linux, etc.:

   echo "dhopper.dummynet.:0  MIT-MAGIC-COOKIE-1  00000000000000000000000000000\
000" | xargs xauth add

but it bombs on FreeBSD (3.0R) with:

   xauth: (argv):1:  bad "add" command line

Take the pairs of spaces and replace them with one space:

   echo "dhopper.dummynet.:0 MIT-MAGIC-COOKIE-1 0000000000000000000000000000000\
0" | xargs xauth add

and it works fine.

Seems like a bug in xargs processing.  This clearly shows the problem:

   echo "dhopper.dummynet.:0  MIT-MAGIC-COOKIE-1  000000000000000000000000000000000" | xargs -n 1 echo "ARG: "
ARG:  dhopper.dummynet.:0
ARG:
ARG:  MIT-MAGIC-COOKIE-1
ARG:
ARG:  00000000000000000000000000000000

>How-To-Repeat:

	Run the last command above and observe that 5 args are passed to echo 
instead of 3.

>Fix:
	

       Thanks.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jmz 
State-Changed-When: Sun May 23 08:59:27 PDT 1999 
State-Changed-Why:  
Fixed. 
>Unformatted:
