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 PROTECTED] wrote:
> > > 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 of parsing is allowed, then it would
> > most likely have to be sh(1)-like.  This means that the mechanism that
> > inteprets '#!' would have to know all the intricacies of the sh(1)
> > parser to work correctly in all cases.  Incomplete sh(1)-like parsers
> > that would understand "most of the sh(1) shell syntax" would be
> > exactly that... incomplete.
>
> 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 methods.

It also suffers from problems with arguments that are meant to include
spaces, like:

        #!/bin/sh "hello world" "foo bar"

Without a fully functional sh(1)-like parser, any solution that does
magic with argv[] is incomplete :-(


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to