EDIT 1:
A naive attempt to remove .bash_profile from the end of the first line of my .bash_profile did not make it disappear from the output of echo $PATH which remained unchanged.
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalEDIT 1:
A naive attempt to remove .bash_profile from the end of the first line of my .bash_profile did not make it disappear from the output of echo $PATH which remained unchanged.
EDIT 1:
A naive attempt to remove .bash_profile from the end of the first line of my .bash_profile did not make it disappear from the output of echo $PATH which remained unchanged.
bash:~ $ type -all exiftool Subsequently, I ran...
bash:~ $ echo $PATH Which returned...
bash:~ $ PATH=$(echo $PATH | awk -v RS=: -v ORS=: '!($0 in a) {a[$0]; print}') >>> print(os.environ['PATH']) This is what was supposed to work according to Mitch Frazier from Linux Journal. Obviously this is no a reflection on him or the article but rather on my limited understanding.
bash:~ $ export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/fsl/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin~/.bash_profile bash:~ $ echo -n $PATH | awk -v RS=: '!($0 in a) {a[$0]; printf("%s%s", length(a) > 1 ? ":" : "", $0)}' bash:~ $ PATH=$(n= IFS=':'; for e in $PATH; do [[ :$n == *:$e:* ]] || n+=$e:; done; echo "${n:0: -1}") type -all exiftool Subsequently, I ran...
PATH=$(echo $PATH | awk -v RS=: -v ORS=: '!($0 in a) {a[$0]; print}') print(os.environ['PATH']) This is what was supposed to work according to Mitch Frazier from Linux Journal. Obviously this is no a reflection on him or the article but rather on my limited understanding.
export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/fsl/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin~/.bash_profile echo -n $PATH | awk -v RS=: '!($0 in a) {a[$0]; printf("%s%s", length(a) > 1 ? ":" : "", $0)}' PATH=$(n= IFS=':'; for e in $PATH; do [[ :$n == *:$e:* ]] || n+=$e:; done; echo "${n:0: -1}") bash:~ $ type -all exiftool Subsequently, I ran...
bash:~ $ echo $PATH Which returned...
bash:~ $ PATH=$(echo $PATH | awk -v RS=: -v ORS=: '!($0 in a) {a[$0]; print}') >>> print(os.environ['PATH']) This is what was supposed to work according to Mitch Frazier from Linux Journal. Obviously this is no reflection on him or the article but rather on my limited understanding.
bash:~ $ export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/fsl/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin~/.bash_profile bash:~ $ echo -n $PATH | awk -v RS=: '!($0 in a) {a[$0]; printf("%s%s", length(a) > 1 ? ":" : "", $0)}' bash:~ $ PATH=$(n= IFS=':'; for e in $PATH; do [[ :$n == *:$e:* ]] || n+=$e:; done; echo "${n:0: -1}")