I have a linux filter to extract all lines from an xcode project that contain localized strings and produce a sorted list of unique entries. The filter works fine and is shown below.
grep NSLocalized *.m | perl -pe 's/.*NSLocalizedString\((.+?)\,.*/$1/' | sort | uniq
The result is a list of strings looking like this
@"string1"
@"string2"
etc
What I now need to do is identify the entries that do not exist within another textfile. So imagine I have a text file containing;
@"string1"
@"string3"
etc
The result would be @"string2"
as it is not present in the file
For the sake of argument, the file is named list.txt
What do I need to add to my filter? I'm sure I can do this with grep but my brain has failed!