(let ((counter 0)) (with-pipeline () (program "ls" "-1la") (lambda-line (line) (format t "~x~%" (incf counter (length line)))) (program "sed" "-n" "s/A/_/g ; /__/ p")) counter)
2__8 15399
(catch :pipeline (block nil (let* ((#:input%2195 (pipeline::ensure-stream nil :input nil)) (#:output%2196 (pipeline::ensure-stream t :output nil)) (#:error%2197 (pipeline::ensure-stream :output :error #:output%2196))) (let ((#:g2199 (program "ls" "-1la")) (#:g2200 (lambda-line (line) (format t "~x~%" (incf counter (length line))))) (#:g2201 (program "sed" "-n" "s/a/_/g ; /__/ p"))) (pipeline.pipes:with-pipes% (#:pipes2198 2) (lastcar (mapcar #'pipeline.filters:clean (list (pipeline.filters:spawn #:g2199 :input #:input%2195 :output (pipeline.pipes:pipe-out (svref #:pipes2198 0)) :error #:error%2197 :wait nil) (pipeline.filters:spawn #:g2200 :input (pipeline.pipes:pipe-in (svref #:pipes2198 0)) :output (pipeline.pipes:pipe-out (svref #:pipes2198 1)) :error #:error%2197 :wait nil) (pipeline.filters:spawn #:g2201 :input (pipeline.pipes:pipe-in (svref #:pipes2198 1)) :output #:output%2196 :error #:error%2197 :wait t)))))))))
https://github.com/zhaqenl/pelo/blob/master/pelo.lisp#L112
(defun get-ping (host) "Get ping reply from host." (inferior-shell:run/ss `(inferior-shell:pipe (ping -c 1 ,host) (grep "time=") (sed -e "s/^.*time=//;s/ *ms$//"))))
https://github.com/ebzzry/pell/blob/master/pell#L124