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 340635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:38:04+00:00 2026-05-12T10:38:04+00:00

I usually use the following pipeline to grep for a particular search string and

  • 0

I usually use the following pipeline to grep for a particular search string and yet ignore certain other patterns:

grep -Ri 64 src/install/ | grep -v \.svn | grep -v "file"| grep -v "2\.5" | grep -v "2\.6"

Can this be achieved in a succinct manner? I am using GNU grep 2.5.3.

  • 1 1 Answer
  • 0 Views
  • 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-12T10:38:04+00:00Added an answer on May 12, 2026 at 10:38 am

    Just pipe your unfiltered output into a single instance of grep and use an extended regexp to declare what you want to ignore:

    grep -Ri 64 src/install/ | grep -v -E '(\.svn|file|2\.5|2\.6)'
    

    Edit: To search multiple files maybe try

    find ./src/install -type f -print |\
        grep -v -E '(\.svn|file|2\.5|2\.6)' | xargs grep -i 64
    

    Edit: Ooh. I forgot to add the simple trick to stop a cringeable use of multiple grep instances, namely

    ps -ef | grep something | grep -v grep
    

    Replacing that with

    ps -ef | grep "[s]omething"
    

    removes the need of the second grep.

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

Sidebar

Related Questions

When plotting color-maps using gnuplot, I usually use the following lines: ... set palette
I usually use pointers in the following manner char *ptr = malloc( sizeof(char) *
I usually use JSON with jQuery to just return a string with html. However,
I usually use the following Python code to read lines from a file :
So my issue is, usually when I generate my maps I'd use the following:
I usually use the following idiom when working with a Python dictionary: try: val
I'm trying to use the following code to upload a csv file usually around
The following script is what I usually use to push headers to the browser
In our code we usually use the following pattern: Connection conn; try{ conn =
So the branching model I usually use is similar to the following: http://nvie.com/posts/a-successful-git-branching-model/ However,

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.