(defun sh (com &rest args) (let ((path (which com))) (with-output-to-string (s) (with-open-stream (files (sb-ext:process-output (sb-ext:run-program path args :output s))))))) (defun which (exe) (if (eql #\/ (char exe 0)) exe (let* ((com (format nil "which ~a" exe))) (line1 (sh "/bin/bash" "-c" com))))) (defun line1 (s) (format nil "~A" (read-from-string s)))