Skip to main content
edited title
Link

Duplicate paths that I can't deletePaths, possible issuesIssues with .bash_profile

Tried something which didn't work, added brief note.
Source Link

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.

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.

Grammar
Source Link
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}") 
Source Link
Loading