From owner-freebsd-current Sat Apr 21 7:52:48 2001 Delivered-To: freebsd-current@freebsd.org Received: from mx7.port.ru (mx7.port.ru [194.67.23.44]) by hub.freebsd.org (Postfix) with ESMTP id B616637B423 for ; Sat, 21 Apr 2001 07:52:43 -0700 (PDT) (envelope-from kabaev@mail.ru) Received: from adsl-141-154-40-154.bostma.adsl.bellatlantic.net ([141.154.40.154] helo=kan.dnsalias.net) by mx7.port.ru with esmtp (Exim 3.14 #17) id 14qykX-0004iB-00; Sat, 21 Apr 2001 18:52:37 +0400 Received: (from kan@localhost) by kan.dnsalias.net (8.11.3/8.11.3) id f3LEq6V00907; Sat, 21 Apr 2001 10:52:06 -0400 (EDT) (envelope-from kan) Message-ID: X-Mailer: XFMail 1.4.7p2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <93802.987862964@axl.fw.uunet.co.za> Date: Sat, 21 Apr 2001 10:52:05 -0400 (EDT) From: Alexander Kabaev To: Sheldon Hearn Subject: Re: cp -d dir patch for review (or 'xargs'?) Cc: freebsd-current@FreeBSD.ORG, (Jens Schweikhardt) , (Brian Dean) , "Rodney W. Grimes" , Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 21-Apr-2001 Sheldon Hearn wrote: > > > On Sat, 21 Apr 2001 14:06:04 +0100, Brian Somers wrote: > >> How do you do this in a script: >> >> cd /topdir; find . -type f | xargs -i {} cp {} /otherdir/. > > for i in `find /path/to/source -type f`; do > cp $i /path/to/dest/ > done > > What's all the fuss about? > It looks like above construct will fail horribly if any of the files in /topdir have names with spaces in them. Think MP3 collections :) > Ciao, > Sheldon. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message ---------------------------------- E-Mail: Alexander Kabaev Date: 21-Apr-2001 Time: 10:49:59 ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message