From owner-freebsd-current Fri Apr 20 19:39:49 2001 Delivered-To: freebsd-current@freebsd.org Received: from bsdhome.dyndns.org (unknown [24.25.2.193]) by hub.freebsd.org (Postfix) with ESMTP id 822F037B424 for ; Fri, 20 Apr 2001 19:39:46 -0700 (PDT) (envelope-from bsd@bsdhome.com) Received: from vger.bsdhome.com (vger [192.168.220.2]) by bsdhome.dyndns.org (8.11.3/8.11.3) with ESMTP id f3L2dhJ41506; Fri, 20 Apr 2001 22:39:44 -0400 (EDT) (envelope-from bsd@bsdhome.com) Received: (from bsd@localhost) by vger.bsdhome.com (8.11.3/8.11.1) id f3L2dhe59175; Fri, 20 Apr 2001 22:39:43 -0400 (EDT) (envelope-from bsd) Date: Fri, 20 Apr 2001 22:39:43 -0400 From: Brian Dean To: "Rodney W. Grimes" Cc: Jens Schweikhardt , freebsd-current@FreeBSD.ORG Subject: Re: cp -d dir patch for review (or 'xargs'?) Message-ID: <20010420223943.A59039@vger.bsdhome.com> References: <20010420235419.B1276@schweikhardt.net> <200104210226.TAA68957@gndrsh.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104210226.TAA68957@gndrsh.dnsmgr.net>; from freebsd@gndrsh.dnsmgr.net on Fri, Apr 20, 2001 at 07:26:18PM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Apr 20, 2001 at 07:26:18PM -0700, Rodney W. Grimes wrote: > > (cat bigfilelist; echo destdir) | xargs cp > > I like this version of the patch!! It's much much cleaner than > hacking up cp or xargs, it even follows the unix principle of > using simple tools and glueing them togeather to do bigger > jobs, is unix implementation independent, and is very clear > in what it does. It's clean, simple, and unfortunately, totally bogus. Try: echo 1 2 3 4 5 6 7 8 9 | xargs -n 4 echo Now consider what would happen with the above suggested construct with a very long file list. I don't see a problem with adding an option to cp to treat the first argument as the target instead of the last argument. It's a simple solution, the code change is simple, and it produces the exact desired result. What's the problem? -Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message