[webkit-dev] file names with spaces

Chris Jerdonek cjerdonek at webkit.org
Mon Mar 22 23:01:47 PDT 2010


On Mon, Mar 22, 2010 at 10:46 PM, Maciej Stachowiak <mjs at apple.com> wrote:

> The most unavoidable exceptions seem to be for test cases that are
> specifically testing what happens when you have a space in the filename, not
> for third-party code. Does the no-spaces rule make it easier to write shell
> commands if there are still files that violate it?

If such files are fewer or limited to certain directories, it would be
easier to screen them out using primitive techniques (e.g. excluding a
test directory).

In my case, I executed a command like the following (simplifying it
for the sake of an example):

find WebKitTools -type f -wholename '*' \
     \! \( -wholename '*.svn*'  \) \
     -print0 | xargs sed -i '' -e ''

but got the following error--

sed: Layout: No such file or directory

because of this file--

./WebKitTools/DumpRenderTree/fonts/WebKit Layout Tests 2.ttf

My problem was that I left out the "-0" after xargs which I wouldn't
have otherwise needed.  While my issue was easy to fix, the following
page made it seem like it can be especially tricky to deal with spaces
if you are doing something more complicated:

http://www.macgeekery.com/tips/cli/handling_filenames_with_spaces_in_bash

--Chris


More information about the webkit-dev mailing list