I'm trying to pass commands as an argument to my script
> ./index.bat "echo foo && echo bar"
script:
@echo off
echo %1%
set f=%1%
echo %f%
set f=%f:~1,-1%
echo %f%
output:
"echo foo && echo bar"
"echo foo && echo bar"
bar
echo foo
why is the second part of the command in the argument executed?