Linux – Windows equivalent of $ in unix commands

bashcommand lineexportlinuxwindows 10

I am following a documentation and executing some commands in Windows 10 command prompt.

I have executed the first two commands using setx, since setx is the Windows' equivalent for export and when I try the third command $OPENAI_LOGDIR is not properly detected. Can someone help with the equivalent of this in windows?

commands

export OPENAI_LOG_FORMAT='stdout,log,csv,tensorboard'
export OPENAI_LOGDIR=path/to/tensorboard/data

tensorboard --logdir=$OPENAI_LOGDIR

Best Answer

It depends on the shell. The $ symbol starts a name and indicates that's a variable in most Unix shells. To do the same in Windows cmd use %OPENAI_LOGDIR%. In Windows PowerShell use the same syntax as bash, i.e. $OPENAI_LOGDIR. However if it's an environment variable in PowerShell you need to access use the env: prefix: $env:OPENAI_LOGDIR

Related Question