2
我對一些腳本使用Common Lisp,並希望執行shell命令run-program
。我一直試圖操縱輸出以獲得(output error returncode)
的形式的列表,但我只能從運行程序得到輸出或返回代碼。CLISP:從shell命令返回stdout,stderr和retcode
的論點在這裏只給你:output
(沒有:error
):
有越來越三者的方法嗎?事情是這樣的:
(setf retcode (my-special-cmd "ls" :output stream1 :error stream2))
(print (list stream1 stream2 retcode))
[Common Lisp中的值函數]的可能重複(http://stackoverflow.com/questions/22795608/values-function-in-common-lisp) – sds