Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directories with spaces in the name are not searched #19

Open
NightIsland opened this issue Feb 19, 2014 · 1 comment
Open

Directories with spaces in the name are not searched #19

NightIsland opened this issue Feb 19, 2014 · 1 comment

Comments

@NightIsland
Copy link

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.

@ik2wxx
Copy link

ik2wxx commented Nov 3, 2016

Can you please post the entire 'NSString *cmd =' line, with parameters ?
Tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants