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