Question

In REPL, we can get its output normally:

(shell "head -3 ~/misc.lisp")
(asdf:make-build 'stumpwm :type :program :monolithic t
             :move-here "."
             :name-suffix ""

However, we get nil from (shell "head -3 ~/misc.lisp") in slime.

Sincerely!

Was it helpful?

Solution 2

use #'run-shell-command instead of shell:

(let ((str (ext:run-shell-command cmd :output :stream)))
    (loop  for line = (read-line str  nil)
        until (null line)
        do (print line)))

it works now.

OTHER TIPS

I don't know which Lisp implementation you're using, but normally you should need a package to run shell command like:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top