我想在Emacs,口齿不清执行以下shell命令:在Emacs-lisp中,对ls命令使用call-process的正确方法是什么?
ls -t ~/org *.txt | head -5
我尝试下面的例子:
(call-process "ls" nil t nil "-t" "~/org" "*.txt" "| head -5")
结果
ls: ~/org: No such file or directory
ls: *.txt: No such file or directory
ls: |head -5: No such file or directory
任何帮助将不胜感激。
完美答案。谢谢! – eatloaf 2011-02-03 16:23:20
@eatload - gald能够提供帮助 - R. P. Dillon的`shell-command`似乎也是一个很好的选择。 – 2011-02-03 16:34:28