[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About "program" and "command"
From: |
Barry Margolin |
Subject: |
Re: About "program" and "command" |
Date: |
Sun, 24 Mar 2013 10:34:41 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.22746.1364128338.855.help-gnu-emacs@gnu.org>,
Xue Fuqiao <xfq.free@gmail.com> wrote:
> The doc string of `call-process' says:
>
> Call PROGRAM synchronously in separate process.
>
> The doc string of `call-process-shell-command' says:
>
> Execute the shell command COMMAND synchronously in separate process.
>
> What's the different of these two functions? In other words, what's the
> difference of "program" and "command" here? After searching the
> archives, I found two threads[1][2], but they don't help. So can I get
> a pointer to information on these two concepts?
>
>
> [1] http://lists.gnu.org/archive/html/help-gnu-emacs/2010-09/msg00009.html
> [2] http://lists.gnu.org/archive/html/help-gnu-emacs/2007-10/msg00059.html
A program is just a single external executable. A shell command is a
whole shell command line -- it can run multiple commands (separated by
';') and use shell metacharacters (wildcard filenames, backticks, I/O
redirection and piping, etc.).
It's like the difference between execl() and system() in C programming.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***