I want to create excel of all open strings @"..." in .h and .m files throughout my project. To standardise strings across platform. Is there any tool to get strings ? I used genstrings but it only finds localized strings.
Asked
Active
Viewed 162 times
2 Answers
2
One option can be using 'grep' command recursively on all files in ur project folder ending with .h and .m
Something like:
grep -Po '@" \K.*(?= ")' inputfilename.h > outfile.txt
The result will be saved in the file outfile.txt. I have not tested it personally but you can give it a try...

Sachindra Pandey
- 417
- 4
- 5
-
What is command to apply above command recursively to all files in folder and sub folders ? *.h *.m ?? – Satyam Raikar Sep 24 '14 at 10:51
1
You need to install BREW first and then GNU grep. -p no longer works with current grep in osx. http://www.heystephenwood.com/2013/09/install-gnu-grep-on-mac-osx.html
I used following command after installing GNU grep
grep -rPo --no-filename --include='*.m' '(?<=@")(.*)(?=")' * >> outfile.txt
regex is not proper but still manageable.

Satyam Raikar
- 465
- 6
- 20