Re: [PATCH] Linux 2.6: shebang handling in fs/binfmt_script.c

From: Hansjoerg Lipp
Date: Mon Feb 23 2004 - 15:29:29 EST


On Sun, Feb 22, 2004 at 12:53:12PM -0800, Paul Jackson wrote:
> > BTW, which shell expects the name of the script in argv[2]?
>
> Which ones don't? The burden is on you, not me. The Bourne like shells
> that I happen to try just now _do_ display syntax error messages in
> shell scripts with the name of the shell script file in the error
> message. Look and see how they are getting that script file name.

Although I still don't think, this is relevant (because scripts for
interpreters having these problems don't have to pass multiple arguments
on the shebang line), I just tested some example scripts like this:
----
#!/bin/zsh -v -x
echo "argv0: $0"
/foo/bar
----
(the last line to get an error message).
Everything works as expected using those shells:
ksh: PD KSH v5.2.14
GNU bash: 2.05b
ash: 0.2
zsh: 4.1.1
tcsh: 6.12.00

I could have a look at the sources, but as this is the behaviour the man
pages and susv3 describe, this should be "evidence" enough(?).

Regards,

Hansjoerg Lipp
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/