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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:21:16+00:00 2026-06-12T21:21:16+00:00

this is my file perl5lib.sh: export PERL5LIB=`cat |tr ‘\n’ ‘:’`<<EOF /home/vul/repository/projects/implatform/daemon/trunk/lib/ /home/vul/repository/projects/platformlib/tool/trunk/cpan_lib /home/projects/libtrololo I

  • 0

this is my file perl5lib.sh:

export PERL5LIB=`cat |tr '\n' ':'`<<EOF
/home/vul/repository/projects/implatform/daemon/trunk/lib/
/home/vul/repository/projects/platformlib/tool/trunk/cpan_lib
/home/projects/libtrololo

I want to start file as

. perl5lib.sh

to populate PERL5LIB variable, but it hangs. What is wrong?
my goal is to left folder names at the end of file, so I can add new simply:

echo dirname >> myscript

I have tried and export PERL5LIB=$(echo blabla) and cat<<EOF both work separately, but not together.

=================== THE SOLUTION ============================

function do the trick!

function fun
{
     export PERL5LIB=`cat|tr '\n' ':'`
}
fun<<EOF
/dir1/lib
/dir2/lib
/dir3/lib
EOF
  • 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-12T21:21:17+00:00Added an answer on June 12, 2026 at 9:21 pm

    cat is useless here. Provide EOF inside the subshell:

    #! /bin/bash
    export PERL5LIB=$(tr '\n' ':'<<EOF
    /home/vul/repository/projects/implatform/daemon/trunk/lib/
    /home/vul/repository/projects/platformlib/tool/trunk/cpan_lib
    /home/projects/libtrololo
    EOF
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem Consider this file tree as my development repository. - foo/ - .git/ -
Taking this file as an example, I'm trying to read the data in a
How this file can be closed. Any idea? with open('output.txt','w', encoding='UTF-8') as output: output.writelines(str(i)+'\n'
Using this file as source, I have a situation where I need to retrieve
Well this file was put in the repo by mistake and was deleted and
am I uploading this file right? Here is my code: Deleted Code it is
I am using this file , to choose color, its a nice dialog, I
I have this file file.txt which I want to split into many smaller ones.
I have this file structure: folderIWantStuffIn/ - old_stuff Now I want to add some
I have this file which I need to read the first bytes to check

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.