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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:46:37+00:00 2026-05-13T00:46:37+00:00

Im using Ubuntu Karmic as my operating system . I frequently need to search

  • 0

Im using Ubuntu Karmic as my operating system . I frequently need to search my project folder for a particular string, to see if its there in any of the files in the project folder or its subfolders.
I currently use the find command to do that, and have written a script that accepts the string im looking for as the parameter.

find . -exec grep -l $1 {} \;

But the problem with this is that it does not work with strings having a space in them. So, is there any way to search for space separated strings as well, or is there any available tool that does the job ?

Thank You.

  • 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-13T00:46:38+00:00Added an answer on May 13, 2026 at 12:46 am

    How are you invoking your script?

    If you want to search for space separated strings you need to do the
    invocation in the form:


    %./script_name.sh 'search string'

    and also change the find invocation to :

    find . -exec grep -l “$1” {} \;

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

Sidebar

Related Questions

I am using ubuntu. There are some processes that are doing io frequently on
I am using ubuntu terminal for my project and at times I need more
I'm using Ubuntu 9.10 Karmic Koala and Ruby 1.9.1. I installed Rails using sudo
Anyone had experience using ubuntu desktop edition + mono project to run asp.net 4.0??
hi i'm using ubuntu and i have a little project with several packages i
I am using Ubuntu and have a known URL which I need to download/save
I'm using Ubuntu Oneiric. I started my first Android project in Eclipse, and after
Using Ubuntu, when I run bundle install to set up my Rails environment, it
I am currently using Ubuntu 11.10 and java SE 1.6.0_26. I am trying to
I'm using Ubuntu 12.04 I tried to change my default apache2 port from 80

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.