http://bugs.winehq.org/show_bug.cgi?id=21047
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|cmd does not handle for %%a |cmd does not handle FOR /F |in ('command') |%%a in ('command') properly
--- Comment #1 from Dan Kegel dank@kegel.com 2010-01-06 15:12:10 --- Simple test: a batch file foo.cmd containing for /f %%a in ('echo a b c') do echo %%a should output a
That's supposed to work in wine already, but doesn't seem to. http://source.winehq.org/source/programs/cmd/builtins.c#L888
Here's what one sees with WINEDEBUG=+cmd,+process wine cmd /c foo.cmd ... trace:cmd:WCMD_for Processing for filespec from item 1 'L"'echo"' trace:cmd:WCMD_execute command on entry:L"'echo a b c" ((nil)), with '(null)'='(null)' trace:cmd:WCMD_execute Redirect 1 to 'L"echo"' (0x44) trace:cmd:WCMD_execute Command: 'L"'echo a b c"' trace:cmd:WCMD_execute param1: L"'echo", param2: L"a" trace:cmd:WCMD_run_program Searching in 'L".;C:\windows\system32;C:\windows"' for 'L"'echo"' trace:cmd:WCMD_run_program Found as L"Z:\data\dkegel\wine-git\'echo.*" trace:cmd:WCMD_run_program Found as L"C:\windows\system32\'echo.*" trace:cmd:WCMD_run_program ASSUMING INTERNAL trace:process:CreateProcessW app (null) cmdline L"'echo a b c" ... trace:process:find_exe_file Trying built-in exe L"C:\windows\system32\'echo a b c.exe" File not found
See also http://ss64.com/nt/for_cmd.html and http://ss64.com/nt/for_f.html