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.
Asked
Active
Viewed 3,312 times
0

user8897013
- 131
1 Answers
0
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/"

ob2
- 3,553
-
1The first directory is probably added to
PATH
via~/.profile
. – Gunnar Hjalmarsson Jan 25 '19 at 11:38
export PATH=$PATH:/home/mike/bin/:/home/mike/app/
without wildcards*
. – pa4080 Jan 25 '19 at 08:32source
the script instead for that to happen. - Besides, I think you should not have the*
globs there in the PATH string. You only need the directory itself listed there, no file – Byte Commander Jan 25 '19 at 09:19