Date: Sat, 21 Apr 2001 16:58:48 +0200 From: Sheldon Hearn <sheldonh@uunet.co.za> To: Alexander Kabaev <kabaev@mail.ru> Cc: freebsd-current@freebsd.org, schweikh@schweikhardt.net (Jens Schweikhardt), bsd@bsdhome.com (Brian Dean), "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>, Brian Somers <brian@awfulhak.org> Subject: Re: cp -d dir patch for review (or 'xargs'?) Message-ID: <12006.987865128@axl.fw.uunet.co.za> In-Reply-To: Your message of "Sat, 21 Apr 2001 10:52:05 -0400." <XFMail.20010421105205.kabaev@mail.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 21 Apr 2001 10:52:05 -0400, Alexander Kabaev wrote: > > 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 :) Your comments have nothing to do with the issue at hand. Just wrap the first argument to cp in double-quotes, i.e. cp "$i" The point is, why bastardize tools to cope with areas beyond their focus and well within the focus of other tools? Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12006.987865128>