From: Sam S. <sd...@gn...> - 2004-06-24 18:23:51
|
> * Jacques B. Siboni <wn...@yh...t> [2004-06-24 16:41:23 +0000]: > > when I run > [17]> (setq foo (shell '|ls *.kb|)) > > > I get: > dsm3.kb printed by ls > 0 returned EXT:SHELL > Can someone tell me how to get the return of my shell command into a > lisp variable? try (with-open-stream (s (run-program "ls" :arguments '("-l") :output :stream)) (loop :for l = (read-line s nil nil) :while l collect l)) -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> Any programming language is at its best before it is implemented and used. |