> > the method used by FBSD 2.2.7 seems the most sane to me,
> > where execve's argv[] is loaded by each whitespace
> > seperated element after the shebang,
> > then by command line options.
> >
> > 1. it is flexible.
> > 2. it functions intuitively.
> > 3. i don't think it breaks less flexible
Oh boy! Deja-vu...
On 2003-02-28 18:32, [EMAIL PROTECTED] wrote:
> This concerned how to load execve()'s argv[] array when parsing the
> 'shebang' line of a script, ie: whether to pass everything after
> '#!/interpeter'
>
> 1. as one string into execve()'s argv[] array, as some systems do, or
>
minor correction/addition to previous post:
instead of "infinitely recursive", i should've
said that it would break things if "script"
re-exec's the same file with a
different interpreter.
--
> #!/bin/sh
> . script
this won't work if "script" is going to do something
before exec'ing
Please don't remove me from the Cc: list when you reply to posts that
you want me to see. Otherwise, I might miss one of your replies and
give you the false impression that I'm somehow ignoring your posts.
On 2003-02-10 01:18, [EMAIL PROTECTED] wrote:
> Giorgos Keramidas wrote:
> > [EMAIL PROTECT
> > it seems more sane to allow arguments to a script given to an
> > interpreter on the shebang line, passing everything after
> > "#!/interpreter [arg]" off for "eval" or "sh -c" type parsing.
>
> This is something that can be bth good and bad though. As you have
> pointed out, if a limited sort
On 2003-02-08 21:58, [EMAIL PROTECTED] wrote:
> this does seem to be an ambiguous area.
>
> it seems more sane to allow arguments to a script given to an
> interpreter on the shebang line, passing everything after
> "#!/interpreter [arg]" off for "eval" or "sh -c" type parsing.
This is something t
this does seem to be an ambiguous area.
it seems more sane to allow arguments
to a script given to an interpreter on the
shebang line, passing everything after
"#!/interpreter [arg]" off for
"eval" or "sh -c" type parsing.
i don't know how it breaks anything to load execve's argv[]
with everythin
On Sat, 8 Feb 2003 [EMAIL PROTECTED] wrote:
> say i have 2 scripts, scriptA and scriptB.
>
> scriptA
> ---
> #!/bin/sh ./scriptB 1 2 3
>
> scriptB
> ---
> #!/bin/sh
>
> echo 0:$0
> echo 1:$1
> echo 2:$2
> echo 3:$3
>
> --
>
> $ ./scriptA
>
> $0:./scriptB
> $1:1
> $2:2
> $3:3
>
> --
>
> acc
say i have 2 scripts, scriptA and scriptB.
scriptA
---
#!/bin/sh ./scriptB 1 2 3
scriptB
---
#!/bin/sh
echo 0:$0
echo 1:$1
echo 2:$2
echo 3:$3
--
$ ./scriptA
$0:./scriptB
$1:1
$2:2
$3:3
--
according to execve(2), only a single [arg] should be recognized:
#! interpreter [arg]