Skip to content

Instantly share code, notes, and snippets.

@justinmeiners
Created February 3, 2020 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinmeiners/76afb80084d3af02d9de0b71c67beb0b to your computer and use it in GitHub Desktop.
Save justinmeiners/76afb80084d3af02d9de0b71c67beb0b to your computer and use it in GitHub Desktop.
; either input works in SBCL
;(load "~/quicklisp/setup.lisp")
;(ql:quickload "asdf")
(require "asdf")
;(print (asdf:asdf-version))
; of course "cat" is superfulous here,
; but I just wanted to try out piping data.
(defparameter cat
(uiop:launch-program
'("cat" "categories.txt")
:output :stream))
(defparameter grep
(uiop:launch-program
'("grep" "-n" "matter")
:input (uiop:process-info-output cat)
:output :stream))
(uiop:wait-process grep)
(print (read-line (uiop:process-info-output grep)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment