|
From: Eli Z. <el...@gn...> - 2014-06-26 02:56:20
|
> Date: Thu, 26 Jun 2014 02:15:01 +0300 > From: Yuri Kanivetsky <yur...@gm...> > > I suppose wrapper program would be overkill. At least for me. So I've come > with a way to overcome this: > > $ echo 'cmd /c ""cmd" /k echo test"' | cmd > Microsoft Windows [Version 6.2.9200] > (c) 2012 Microsoft Corporation. All rights reserved. > > C:\Users\Yuri>cmd /c ""cmd" /k echo test" > test > > C:\Users\Yuri> > C:\Users\Yuri> > > Though, it spits some extra noise along the way. Another, perhaps easier workaround is to write your command, as you'd type it at the cmd.exe prompt, to a batch file, and then invoke cmd.exe to run that batch file. If you keep the batch file's name without whitespace, the command that invokes it can side-step the quoting issue altogether. When you are done, delete the batch file. |