Having to set a lot of paths on $PATH then wrote this code to load it from a text file:

  cd ~
  echo '#++++++' >> ./pathlstbkp
  cat ./pathlst >> ./pathlstbkp
  while read pth; do 
    cmd='export PATH="'$pth':$PATH"'
    eval ${cmd}
  done < ./pathlst
  echo '' > ./pathlst 

As you can see described here when using eval the evaluated command doesnt run on subshell.
But it dont change the $PATH variable.
Now realized someting strange happens, it dont work on my test Ubuntu-LTS18-Minimal-X64 but works on my main machine, a Debian9.

  • I'm voting to close this question as off-topic because the poster fixed the problem by reinstallation, so it's unlikely that the reason for the issue will ever be found. – Jenny D Mar 22 '19 at 11:43

I deleted the virtual machine and did the same again and it works, probably was something on evironment

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.