Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > 628e26a49117deea42e952d5b0d0f0d7 > files > 70

zsh-doc-4.0.2-2mdk.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from ./zsh.texi on 26 June 2001 -->

<TITLE>zsh - Command Execution</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="zsh_1.html">first</A>, <A HREF="zsh_6.html">previous</A>, <A HREF="zsh_8.html">next</A>, <A HREF="zsh_29.html">last</A> section, <A HREF="zsh_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC30" HREF="zsh_toc.html#TOC30">Command Execution</A></H1>
<P>
<A NAME="IDX78"></A>
<A NAME="IDX79"></A>
If a command name contains no slashes, the shell attempts to locate
it.  If there exists a shell function by that name, the function
is invoked as described in section <A HREF="zsh_8.html#SEC31">Functions</A>.  If there exists
a shell builtin by that name, the builtin is invoked.


<P>
<A NAME="IDX80"></A>
Otherwise, the shell searches each element of <TT>$path</TT> for a
directory containing an executable file by that name.  If the
search is unsuccessful, the shell prints an error message and returns
a nonzero exit status.


<P>
If execution fails because the file is not in executable format,
and the file is not a directory, it is assumed to be a shell
script.  <TT>/bin/sh</TT> is spawned to execute it.  If the program
is a file beginning with `<TT>#!</TT>', the remainder of the first line
specifies an interpreter for the program.  The shell will
execute the specified interpreter on operating systems that do
not handle this executable format in the kernel.


<P><HR><P>
Go to the <A HREF="zsh_1.html">first</A>, <A HREF="zsh_6.html">previous</A>, <A HREF="zsh_8.html">next</A>, <A HREF="zsh_29.html">last</A> section, <A HREF="zsh_toc.html">table of contents</A>.
</BODY>
</HTML>