-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Vladimir Giszpenc on 4/2/2008 8:08 AM:
| Hello,
|
| I was wondering if there was a way to handle spaces in filenames (as an
| enhancement).  Newlines supposedly cause problems too, but I don't think
| I have ever seen a file with one.  However, spaces in filenames are
| common.
|
| Could they be escaped or quoted?

Try find's -print0 action, as well as xargs' -0 option.  By using a NUL
terminator rather than space or newline, you can handle arbitrary file
names safely.  The manual contains other examples of how to properly
handle problematic file names.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf0ZeAACgkQ84KuGfSFAYBOvgCcCXh8u5ilXUKUA6AUPyc0ViaJ
CkgAn36PKU9y4c4deYpASlMH0gV6zjkU
=+ish
-----END PGP SIGNATURE-----


Reply via email to