Very new to bash script...
I'm reading conda.sh on my mac and saw below lines of code. I thought "\" is for escaping? See "\dirname" or last line "\export".
__add_sys_prefix_to_path() {
# In dev-mode CONDA_EXE is python.exe and on Windows
# it is in a different relative location to condabin.
if [ -n "${_CE_CONDA}" ] && [ -n "${WINDIR+x}" ]; then
SYSP=$(\dirname "${CONDA_EXE}")
else
SYSP=$(\dirname "${CONDA_EXE}")
SYSP=$(\dirname "${SYSP}")
fi
if [ -n "${WINDIR+x}" ]; then
PATH="${SYSP}/bin:${PATH}"
PATH="${SYSP}/Scripts:${PATH}"
PATH="${SYSP}/Library/bin:${PATH}"
PATH="${SYSP}/Library/usr/bin:${PATH}"
PATH="${SYSP}/Library/mingw-w64/bin:${PATH}"
PATH="${SYSP}:${PATH}"
else
PATH="${SYSP}/bin:${PATH}"
fi
\export PATH
}
I tried running below commands and got the same outputs.
❯ echo "$(dirname "${CONDA_EXE}")"
/opt/homebrew/Caskroom/miniconda/base/bin
❯ echo "$(\dirname "${CONDA_EXE}")"
/opt/homebrew/Caskroom/miniconda/base/bin
I must be missing something obvious...