saitology9 <
[email protected]> wrote:
When I run the following command from a terminal, I see the output.
I wanted to put it in a proc. But the script gets no data.
It may just be a Windows thing but if it is not, how do I make this work?
% set f [open "|C:/Windows/System32/cmd.exe /Q /C ipconfig" r]
% fconfigure $f -blocking 0 -buffering full
I gave it a try, and I noticed that after the open, a black window
appears and immediately disappears... I'm pretty sure that this
is the window of cmd.exe appearing and immediately taking ipconfig's
output with it to the digital nirvana/afterlife.
cmd.exe itself doesn't produce output, so that's why you don't get
to see any input from the pipe.
Try this instead:
% set f [open "|ipconfig" r]
or, if you don't want to rely on search path, then this one:
% set f [open "|C:/Windows/System32/ipconfig.exe" r]
This seems to do just what you seem to have expected.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)