4.2.2 Annotated examples Creating output for Lisp to process

In the next example, output is created that Lisp can process. If you had an operating system program named"frob" that created output you wanted to process in Lisp, you could write the following code:

(defun frobify (input arguments)
  (with-open-stream (frob (run-program "frob" :output :stream
                                              :input input
                                              :arguments arguments
                                              :wait nil))
    (process-frob-stream frob)))

Theinput parameter could be a filename or a stream, and the arguments would consist of a list of the necessary command-line arguments to the program"frob".

The Advanced User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker