William L. Jarrold wrote:

Thanks a bunch.  Trouble is I get 0 returned.  I wished
I got the string ...

echo Testing shell command

..returned.

Hmm, how to deal with the returned value issue.  See
here is the problem...I just did...

(shell-command "echo Testing")<meta-x pretty-print-eval-of-last-sexp>

shell-command ouputs to a buffer. This is a reasonable thing since commands can be interactive. However, to accomplish what you want, you can just go grab that buffers content like so:

(shell-command "echo Testing")
(save-excursion
   (set-buffer "*Shell Command Output*")
       (buffer-substring (point-min)
                                   (point-max)))

Thanks,

Bill

p.s. (shell-command "hi")<meta-x pretty-print-eval-of-last-sexp>
returns 127.

Hmmm. 127 must be some kind of unix error code?


shell-command usually returns t, as you probably know, t has no real value...

Regards,
Anthony Liguoir

_______________________________________________
Siglinux mailing list
[EMAIL PROTECTED]
http://machito.utacm.org/mailman/listinfo/siglinux

Reply via email to