How to setup Environment variables for RenderMan Pro Server
and PrmanRender
(RMANTREE) installed on The Foundry NUKE 12v1.3, using zsh
shell in macOS 10.15.5 Catalina?
Environment variables can be set either permanently for the life-time of this shell process, for instance
export MYVAR=myvalue
or just for the execution of one command, for instance
MYVAR=myvalue mycommand
You can play around with this using the command printenv
, which, given the name of an environment variable, prints its value:
export FOO=100
BAR=200 printenv FOO BAR
printenv FOO BAR
The first printenv
will output 100 and 200, the second one will output only 100.
If you are only interested in zsh, a useful place to define environment variables permanently is ~/.zshenv
. Bear in mind that this file will be sourced by every zsh you are starting, even those which run non-interactively (i.e. as a script).