Nonbuilt-in C shell command execution
When the C shell determines that a command is not a built-in shell command, it attempts to run the command with the execv subroutine.
Each word in the path shell variable names a directory
from which the shell attempts to run the command. If given neither the -c nor -t flag,
the shell hashes the names in these directories into an internal table. The
shell tries to call the execv subroutine on a directory
only if there is a possibility that the command resides there. If you turn
off this mechanism with the unhash command or give the
shell the -c or -t flag, the shell concatenates with the given
command name to form a path name of a file. The shell also does this in any
case for each directory component of the path variable
that does not begin with a slash (/). The shell then attempts
to run the command.
(cd ; pwd) ; pwddisplays
the home directory without changing the current directory location. However,
the command: cd ; pwd changes the current
directory location to the home directory. Parenthesized commands are most
often used to prevent the chdir command from affecting
the current shell.If the file has execute permission, but is not an executable binary to the system, then the shell assumes it is a file containing shell commands and runs a new shell to read it.
If there is an alias for the shell, then the words of the alias are prefixed to the argument list to form the shell command. The first word of the alias should be the full path name of the shell.