Is Windows 7 now so very Posix-like?
x := ProgStream.open_read("ls", ["-l"]) | stop(&why)
while write(x.read())
lists the current directory. Note that the second argument is a list
of the arguments to the command. If you want to have the arguments
parsed from a single string, or do wildcard expansion, you can run "sh
-c <command>" :-
x := ProgStream.open_read("sh", ["-c", "ls -l *.icn"]) | stop(&why)
Both open_read and open_write let you set the environment of the
external program and also redirect its input (or output as the case
may be) -see the autogenerated docs for more details.
I have no idea how well this would work under Windows (if at all).
These functions are based on fork, dup and exec, so they are very much
unix functions really.
Hope this helps.
Regards
R