2012/09/22

標準入力を読むなら

(load "~/quicklisp/setup.lisp")

(let* ((*standard-output* (make-broadcast-stream))
(*error-output* *standard-output*))
(ql:quickload :series))

(use-package :series)

(write-string
(collect 'string (scan-stream *standard-input* #'read-char)))
yarn:~% echo "hello\nworld" | sbcl --script /tmp/a.lisp
hello
world

0 件のコメント: