Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1077547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:35:26+00:00 2026-05-16T21:35:26+00:00

I have a linux filter to extract all lines from an xcode project that

  • 0

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!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:35:26+00:00Added an answer on May 16, 2026 at 9:35 pm

    You can do:

    grep NSLocalized *.m | 
    perl -pe 's/.NSLocalizedString((.+?)\,./$1/' | 
    grep -v -f list.txt | #ONLY ADDITION
    sort |
    uniq
    

    You pipe the output of perl to grep which is using -v option to invert the search and -f option to get the search pattern from file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have debian linux. I've created from user crontab -e this text: 0 *
I have a linux C program that handles request sent to a TCP socket
We have a linux app that depends on the speed with which the user
I have a linux VPS that uses an older version of python (2.4.3). This
I have been looking into MeeGo, maemo, Android architecture. They all have Linux Kernel,
I have to filter and modify network traffic using Linux kernel libnetfilter_queue (precisely the
I have a problem sending email from a linux machine. The application sends several
Does linux have commands allow me to push my regularly used commands into a
I have a linux server has an ad-hoc wireless network for clients to connect
I have a linux server, I am looking to convert a .wma file to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.