in reply to Modifying %ENV From The Shebang Line
An interpreter file begins with a line of the form:
#! interpreter arg
When an interpreter file is execve'd, the system actually execve's the
specified interpreter. If the optional arg is specified, it becomes the
first argument to the interpreter, and the name of the originally
execve'd file becomes the second argument; otherwise, the name of the
originally execve'd file becomes the first argument. The original argu-
ments are shifted over to become the subsequent arguments. The zeroth
argument is set to the specified interpreter.
Note: it's arg (singular). The manpage claims that this is POSIX standard, so it might apply to Linux, too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Modifying %ENV From The Shebang Line
by williams (Beadle) on Dec 17, 2007 at 23:28 UTC |