Code: Select all
(map set '(myin bcout) (pipe))
(map set '(bcin myout) (pipe))
(process "bc" bcin bcout)
(write-buffer myout "3 + 4\n") ; bc expects a linefeed
(while (read-line myin) (write-line))
(exit)
When i launch the script i get a "new line" waiting for some input, the only think i can do is type ^C to terminate the script.
Instead i'm expecting to see the result of "3+4" printed than the script terminated ...
PS: I'm on linux, newlisp v 9.2.4