On Thu, 24 Jun 2021, Sven Schreiber wrote:
Am 24.06.2021 um 02:38 schrieb Allin Cottrell:
> Now I see that this sort of thing does not work on Windows. My test
> example was a trivial program, printarg.exe, which prints out its first
> argument. My "shell" line in gretl read thus:
>
> ! "c:\users\cottrell\printarg.exe" "foo" >
"c:\users\cottrell\print.out"
>
> Gretl takes this input and turns it into the following request to the
> operating system (with trailing backslash indicating line continuation):
Is this backslash inserted by you for the sake of the email message
here, or is it actually added by gretl before passing it to cmd.exe?
I added it for the sake of email.
> C:\WINDOWS\system32\cmd.exe /c
"c:\users\cottrell\printarg.exe" \
> "foo" > "c:\users\cottrell\print.out"
>
> which looks OK to me. But Windows comes back with:
>
> <windows>
> C:\WINDOWS\system32\cmd.exe /c "c:\users\cottrell\printarg.exe" \
> "foo" 1>"c:\users\cottrell\print.out"
> 'c:\users\cottrell\printarg.exe" "foo' is not recognized as an
internal
> or external command, operable program or batch file.
> </windows>
Apart from the 1>, I'm noticing that the leading and trailing double
quote signs do not appear in Windows's last sentence. (Starts with 'c,
not '"c...)
The "1" before ">" is just Windows' way of indicating that
it's
stdout being redirected, I presume. The dropping of the leading
quote I don't understand.
Allin