Export path working from terminal but not bash script

If I run export PATH=$PATH:/home/mike/bin/*:/home/mike/app/* from a command line it works fine, but if I put it into a bash script, it doesn't work (even with a restart). I have also tried including double-quotes and curly brackets for the variables.

2

1 Answer

You should only add path in this environnement in this variable. Change your script to use the following command

export PATH="$PATH:/home/mike/bin/:/home/mike/app/"
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like