Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!hsi!mlfarm!ron From: ron@mlfarm.com (Ronald Florence) Newsgroups: comp.lang.icon Subject: pipe opens Message-ID: <772@mlfarm.com> Date: 12 Mar 91 20:04:03 GMT Sender: ron@mlfarm.com Organization: Maple Lawn Farm, Stonington, CT Lines: 24 I can't get this bit of code to work: procedure main() write(pipe("bogus-command", "nonsense", "logname")) end procedure pipe(cmd[]) until inf := open(pop(cmd), "pr") got := !inf close(inf) return got end The idea is to try opening a pipe to a series of commands until one succeeds. It doesn't work (at least here), because instead of the open() failing on "bogus-command" and "nonsense", the shell reports that the command wasn't found. Any idea how to do what I want to do? -- Ronald Florence ron@mlfarm.com