This is the code to implement the 'cat' command with lisp, as is explained in the book ANSI Common Lisp, page 122.
(defun pseudo-cat (file) (with-open-file (str file :direction :input) (do ((line (read-line str nil 'eof) (read-line str nil 'eof))) ((eql line 'eof)) (format t "~A~%" line))))
Why is the read-line function read twice? I tried to run it with only one read-line, but the Lisp couldn't finish the code.