I need to assign the output of a program to a variable using a MS batch file.
So in GNU Bash shell I would use VAR=$(application arg0 arg1). I need a si
VAR=$(application arg0 arg1)
On Executing: for /f %%i in ('application arg0 arg1') do set VAR=%%i i was getting error: %%i was unexpected at this time. As a fix, i had to execute above as for /f %i in ('application arg0 arg1') do set VAR=%i
for /f %%i in ('application arg0 arg1') do set VAR=%%i
for /f %i in ('application arg0 arg1') do set VAR=%i