1

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.

Satyam Raikar
  • 465
  • 6
  • 20

2 Answers2

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...

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