Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Directories with spaces in the name are not searched #19

Open
NightIsland opened this Issue · 0 comments

1 participant

@NightIsland

Problem:
for filename in find %@ -name '*.%@'; do cat $filename 2>/dev/null | grep -o %@ ; done

The for filename part will separate file names by the space character, so if you want to search in a file "/Users/XXX/Desktop/Test/Classes/UI Animations/Constants.h", it would try and search "/Users/XXX/Desktop/Test/Classes/UI" and "Animations/Constants.h" and not find either.

Solution:
find %@ -name '*.%@' -exec grep -o '%@' {} \;

This is a good deal faster and will use the whole filename as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.