Timeline for Automatically set an environment variable to be equal to another variable
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 31, 2021 at 19:12 | comment | added | Gilles 'SO- stop being evil' | @ogb119 Make sure to test in a new shell. Shells can cache command paths and not notice if a new executable by the same name is added earlier in the $PATH. | |
| Dec 31, 2021 at 18:17 | comment | added | ogb119 |
Ok, thanks. This doesn't quite work, for some reason the first conda that gets picked up is not the symbolic link I create. Even though the symbolic link is in a folder at the beginning of $PATH. This is probably a quirk specific to conda!
|
|
| Dec 31, 2021 at 15:45 | comment | added | Gilles 'SO- stop being evil' |
@ogb119 Yes. ${0##*/} is the path to the script with all directories removed. "$@" is the list of arguments.
|
|
| Dec 31, 2021 at 15:00 | comment | added | ogb119 |
Can you confirm what the "/usr/bin/${0##*/}" "$@" does? Do the characters get replaced with the name of the command and name of the command argument? e.g. in your example the ${0##*/} equates to conda and the $@ equates to foo?
|
|
| Dec 30, 2021 at 22:18 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 4.0 |