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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:10:42+00:00 2026-05-29T11:10:42+00:00

Very strange situation. check this out : billy@prog:~/sql$ grep -R temp_exchange *.sp billy@prog:~/sql$ grep

  • 0

Very strange situation. check this out :

billy@prog:~/sql$ grep -R temp_exchange *.sp
billy@prog:~/sql$ grep -R temp_exchange *
events/sumup_events_by_exchange.sp:drop table if exists temp_exchange;
events/sumup_events_by_exchange.sp:create temporary table temp_exchange

so – the first grep returned nothing back, but the second grep did. therefore – the first grep should have returned something back as the sought after string was in a file ending with .sp (specified in the first command).

so I’d rather not parametrize this command with * as that seems a bad habit to get into.

Any other way I can do what I want without * ?

TIA!

Don

  • 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-29T11:10:43+00:00Added an answer on May 29, 2026 at 11:10 am
    grep -R --include=*.sp temp_exchange *
    

    The last argument (in this case *) tells grep which files and directories to search.
    This will cause grep to search a list of files consisting of all top level files that match the pattern, plus (in recursive mode) ALL files inside the directories.

    Within these directories you can specify particular file patterns using the –include option.

    From http://ss64.com/bash/grep.html

     -R
     -r
     --recursive
       Read all files under each directory, recursively; this is equivalent to the -d recurse option. 
     --include=PATTERN
       Recurse in directories only searching file matching PATTERN. 
     --exclude=PATTERN
       Recurse in directories skip file matching PATTERN.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in a strange situation now, I am very new to MS Sql
A very strange situation, I've got this code that is supposed to make an
Very strange things happening in phpMyAdmin (mySQL).... The Situation: I have a table with
I have a very strange situation. I have a large set of records to
I find this very strange, must be something I'm doing wrong, but still... I'm
I am running into a very strange situation when using the PackageManager.getInstalledPackages() method. The
Very strange issue... I have something like this in my Controller: public ActionResult Initialize(IEnumerable<MyModel>
Very strange situation here: I'm using L2S to populate a DataGridView. Code follows: private
I have faced a very strange situation here. I am accessing database (MDB) through
Has anyone seen this very strange behaviour before? I've got a solution whith 70

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.