Windows/DOS
From dbawiki
Return the value of a function into a variable in DOS batch .bat file
What an awful language!
set NLS_LANG= @echo NLS_LANG has been cleared @FOR /F "usebackq delims=!" %%i IN (`sqlplus -s /nolog @set_NLS_LANG.sql`) DO @set NLS_LANG=%%i @echo NLS_LANG has been set to %NLS_LANG%