Re: [PATCH] Linux 2.6: shebang handling in fs/binfmt_script.c
From: Paul Jackson
Date: Mon Feb 23 2004 - 17:28:36 EST
> #!/bin/zsh -v -x
> this should be "evidence" enough(?)
This testing was done on a system with your patch applied, right?
Because on a stock kernel, the various shells are of course
confused by the "-v -x" argv.
I will grant that ksh, bash, ash, tcsh and zsh are likely ok
(willing to see > 1 option before the script file name.)
An alternative way to test the same thing, that works even on
a stock kernel:
$ echo 'echo "$*"' > ./d
$ ash -e -e ./d 1 2 3
$ tcsh -v -v ./d 1 2 3
$ zsh -e -e ./d 1 2 3
$ ksh -e -e ./d 1 2 3
$ bash -e -e ./d 1 2 3
The thing being tested: will a shell handle > 1 option before a script
file name. Each shell invocation of the "./d" script should echo the
script file arguments "1 2 3".
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
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/