views:

173

answers:

2

I have an directory, which has a lot of subdirectories. those subdirs sometimes even have subdirs. there are source files inside.

How could I use genstrings to go across all these dirs and subdirs?

Let's say I cd to my root dir in Terminal, and then I would type this:

genstrings -o en.lproj *.m

How could I tell it now to look into all these directories? Or would I have to add a lot of relative paths comma separated? how?

+1  A: 

One method would be:

find ./ -name *.m | xargs genstrings -o en.lproj

xargs is a nice chunk of shell-foo. It will take strings on standard in and convert them into arguments for the next function. This will populate your genstrings command with every .m file beneath the current directory.

Brian King
+3  A: 

I don't know exactly why, but Brian's command didn't work for me. This did:

find . -name \*.m | xargs genstrings -o en.lproj
Uberhamster