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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:14:30+00:00 2026-06-06T23:14:30+00:00

I was just trying the below code and it is not working.. please suggest

  • 0

I was just trying the below code and it is not working.. please suggest to correct this code..

echo abc.txt | while read name; do find . -name $name; done

output success : ./rak/abc.txt

echo 'abc.txt pqr.txt' | while read name; do find . -name $name; done

output error : find: 0652-009 There is a missing conjunction

echo "abc.txt pqr.txt" | while read name; do find . -name $name; done

output error : find: 0652-009 There is a missing conjunction

same error with

echo "abc.txt" "pqr.txt" | while read name; do find . -name $name; done
echo 'abc.txt' 'pqr.txt' | while read name; do find . -name $name; done

Please suggest how to resolve this problem…

  • 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-06-06T23:14:40+00:00Added an answer on June 6, 2026 at 11:14 pm

    The problem is that the multiple entries are sent into the pipe as one line, the read picks up both strings into name and then processes the $name containing the two strings.

    You should use something like:

    echo -e "abc.txt\npqr.txt" | while read name; do find . -name $name; done
    

    i.e. separate the items with a newline.

    You should have tried debugging this by using echo "'$name'" instead of the find and it would have hinted what was happening.

    Additionally, I would use quoting around the use of $name in the find, as if the filename is expected to have a space in it’s name then you will get the same error message as you have experienced originally.

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

Sidebar

Related Questions

I grabbed this code form JCarousel and just trying to understand these lines below.
just trying to test for equality in this piece of code, but getting a
I am just trying to figure out what the below means in Ruby. ([^]*)$/
I have a Php page the code for which is below, I am trying
So I'm working through the code in this tutorial which has a small button
I am just trying a simple application, to make the browser fullscreen. this is
I am trying to move up and down in AS3 with the code below:
Am working with a file that I haven't written and I'm just trying to
I'm trying to setup the below emblem-important.png so when you click this item, it'll
EDIT I tried both of the suggestions below, but it's still not working... It

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.