cat
Posted: Thu Aug 05, 2004 6:15 pm
Having a need to concatenate files and not having a decent command-line tool, I wrote:which seems to work pretty well. Is there a better sol'n?
Code: Select all
;; cat
;; concatenate files
;; c:> cat file1 file2 file3 ... >stdout
;;
;; cat.make
;; (load {c:\newlisp\link.lsp})
;; (link {c:\newlisp\newlisp.exe} "cat.exe" "cat.lsp")
(map (fn (F) (write-line (read-file F))) (rest (main-args)))
(exit)