You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Problem:
for filename in
find %@ -name '*.%@'
; do cat $filename 2>/dev/null | grep -o %@ ; doneThe 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.
The text was updated successfully, but these errors were encountered: