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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:21:47+00:00 2026-06-05T04:21:47+00:00

I’m using a shell script to help me resolve library paths so I can

  • 0

I’m using a shell script to help me resolve library paths so I can send out my app bundle. I don’t know much about shell scripts and was hacking something together from other pieces so I really don’t know how to resolve the issue. The issue revolves around lines like done << ...

Here’s some code! Note, this is based off of a Qt project.

echo "Below is the list of install_name_tools that need to be added:"
while IFS= read -r -d '' file; do
    baseName=`basename "$file"`
    #echo "otool -L \"$file\" | grep -e \"*$baseName\""
    hasUsrLocal=`otool -L "$file" | grep -v -e "*$baseName" | grep -v libgcc_s.1.dylib | grep -v libstdc++.6.dylib | grep "/usr/local\|/Users"`
    if [ -n "$hasUsrLocal" ]; then
        #echo "WARNING: $file has /usr/local dependencies"
        #echo "\"$hasUsrLocal\""

        #echo "To Fix:"

        while read line; do
            #Remove extra info
            library=`echo "$line" | perl -pe 's/(.*?)\s\(compatibility version.*/\1/'`
            libraryBaseName=`basename "$library"`
            frameworkNameBase="$libraryBaseName.framework"
            isframework=`echo "$library" | grep "$frameworkNameBase"`

            unset fixCommand;
            if [ -n "$isframework" ]; then
                #Print out how to fix the framework
                frameworkName=`echo $library | perl -pe "s/.*?($frameworkNameBase\/.+)/\1/"`
                fixCommand=`echo "install_name_tool -change \"$library\" \"@executable_path/../Frameworks/$frameworkName\" \"$file\""`
            else
                #Print out how to fix the regular dylib
                if [ "$baseName" != "$libraryBaseName" ]; then
                    fixCommand=`echo "install_name_tool -change \"$library\" \"@executable_path/../Frameworks/$libraryBaseName\" \"$file\""`
                fi
            fi

            echo "$fixCommand"
        done << (echo "$hasUsrLocal")
        #echo "---------------------------------------------------------"
    fi

done << (find MyProgram.app -type f -print0)

The error this prints is referring to the line done << (echo "$hasUsrLocal")

./deploy.sh: line 563: syntax error near unexpected token `('
./deploy.sh: line 563: `        done << (echo "$hasUsrLocal")'

I’ll get a similar issue for done << (find MyProgram.app -type f -print0) too if I comment out some of the script. Thank you!

  • 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-05T04:21:50+00:00Added an answer on June 5, 2026 at 4:21 am

    I believe the author intended to use a process substitution:

    done < <( find ...
    

    You could also try piping the find into the while loop:

    find MyProgram ... | while IFS= read -r -d '' file; do ... done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
We're building an app, our first using Rails 3, and we're having to build
Does anyone know how can I replace this 2 symbol below from the string
I am using Paperclip to handle profile photo uploads in my app. They upload
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.