[conspire] (forw) Re: UNIX beginner asks: what's a good forum for q's about command-line utilities?

Rick Moen rick at linuxmafia.com
Thu Sep 2 21:33:45 PDT 2010


Quoting Mark Weisler (mark at weisler-saratoga-ca.us):

> I see that you have spaces in your file names, like "August 25, 2010.odt".
> Unix life is simpler if you can avoid spaces in file names. Also, if you
> could simplify and standardize on your file names it would make using
> regular expressions easier.

Yes, as I was saying, the '-print0 / -0' stuff (null-delimit the series
of filenames generated -- a GNU extension to find and xargs) is a decent
compensatory measure in shell expressions that need to handle odd
filenames including ones that have embedded space characters.  E.g.:

find /sourcedir -type f -print0 | xargs -0 mv {} /destdir





More information about the conspire mailing list