3 ms·
>The order above is important, local must come before existing PATHs for lower precedence so that it cannot override higher privilege bins You've got the order
by ryukafalz 7y ago
>The order above is important, local must come before existing PATHs for lower precedence so that it cannot override higher privilege bins
You've got the order reversed there - the first item found in your PATH will be used, and therefore earlier directories in your PATH have higher precedence:
jfred@lambdacrypt ~$ cat dir1/pathtest
#!/run/current-system/profile/bin/bash
echo "script in dir1"
jfred@lambdacrypt ~$ cat dir2/pathtest
#!/run/current-system/profile/bin/bash
echo "script in dir2"
jfred@lambdacrypt ~$ PATH=$HOME/dir1:$HOME/dir2 pathtest
script in dir1
- tomxor 7y agoYou are correct my mistake.