[X-Unix] Script - works, but not where I need it to

Scott J. Kramer x-unix at sjk.us
Thu Jul 1 13:25:12 PDT 2004


--On Thursday, July 1, 2004 00:39 -0500 Bert Knabe 
<bert.knabe at lubbockonline.com> wrote:

> Mike Gorsky emailed me off list and gave me a solution - but I'll look
> up xargs.

The combination of -print0 option with the find command and -0 with
the xargs command are recommended for avoiding troubles with pathnames
containing space characters.  Also, using single or double quotes for
quoting pathnames containing space characters can be more readable than
using backslashes, with (IMO) less risk of dangerously misbehaving typos.
Using your example, compare:

    /Volumes/composing/\ \ \ Running\ Ads/

with:

   '/Volumes/composing/   Running Ads/'

However, an advantage of the backslashes is being able to easily count
the space characters by eye.

-sjk



More information about the X-Unix mailing list