Re: Perl: where is the command in system("command -v wget") documented?
On Mon, Oct 08, 2012 at 10:58:27PM +0100, Karl E. Jorgensen wrote:
> "command" is a shell built-in command - so you should find it in the
> documentation for your shell - e.g. "man sh" should get you to the
> right manual page. Exactly *which* shell this is, depends on your
> system, but it is most likely "bash" or "dash" which provides /bin/sh.
For this reason I'd shy away from relying on 'command' in a script where you
cannot guarantee the execution shell. 'which' is a suitable shell-agnostic
alternative.
Reply to: