Where is Shake's environment variable located in macOS allowing to launch Shake.app via Terminal session in High Sierra?

There's no Shake's variables in ~/.bash_profile, /etc/profile and /etc/bashrc.

enter image description here


You're able to access the shake command line tool because it's in a directory that's listed in the PATH environment variable in your environment.

If you want to know the precise location of the shake executable you can type:

which shake

Which will list the first place it finds the shake executable when it searches all the directories in the PATH environment variable.

If you want to see all the places shake exists you can type:

which -a shake

And that will list all of the places where a command called shake can be found. I don't have shake on my machine, but here's an example using bash. The first occurence of the bash executable for me:

> which bash

And all the places I can find a bash executable in my PATH:

> which -a bash

And my PATH variable looks like this:

> perl -e 'print join("\n", split(/:/,$ENV{"PATH"}))'

Bash command which shake gives me the following result:


And the content of the shake file in /usr/bin/ contains a script like this:

# set env var, NR_SHAKE_LOCATION if not set

if ${?NR_SHAKE_LOCATION} == 0 then
    pushd `dirname $0` >& /dev/null
    setenv NR_SHAKE_LOCATION /Applications/Shake
    popd >& /dev/null

# launch shake

exec ${NR_SHAKE_LOCATION}/shake.app/Contents/MacOS/shake $argv:q

You must log in to answer this question.