As having been bitten by the spaces-in-filenames issue (again) this weekend on Mac OS X, I would like to point out that scripts need to handle filenames with spaces correctly.
Don't require a space-delimited stream of filenames, or if you must, then properly handle all names by way of double-quoting and/or escaping.
Sure, you can put newlines in filenames on some filesystems, too, but it is *far* less prevalent. Spaces occur in user files (and system files) all the time, thanks to Win95 and MacOS guis which encourage human-descriptive filenames.
-- [ e d @ h a l l e y . c c ]
| [reply] |
As having been bitten by the spaces-in-filenames issue (again) this weekend on Mac OS X, I would like to point out that scripts need to handle filenames with spaces correctly.
Or you Mac and Windows people need to stop getting creative with filenames. :)
As an actual solution, you can try using xargs -0 in such situations on OS X. Get a copy of ppt's (Gr. That should link to PPT, not to some search results!) xargs if you're on a Windows machine.
| [reply] [d/l] |
ls|perl -p0le 's/\n\b/:/g' is the same length using perl. | [reply] [d/l] |
This one is quite nice! - I guess someone did his regex homework... ;)
| [reply] |