lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 3 Dec 2008 16:14:10 +0100
From:	Geralt <usr.gentoo@...glemail.com>
To:	linux-kernel@...r.kernel.org
Subject: Shebang - why are parameters not splitted on whitespace?

Hi,

I've just noticed, that it's not possible to use more than one
parameter in a shebang on linux, because everything following the
executable path in the shebang is treated as one parameter, so for
example
#!/bin/awk --re-interval -f
in a script called "test.awk" results in a call likes this:
/bin/awk "--re-interval -f" ./test.awk
when running it with "./test.awk".

Is there any reason why the parameters are not split before passing
them on to the program?
I mean we're talking here about linux where every program starts
somewhere with int main( int argc, char* argv[]), i.e. the arguments
are given piecewise, not in one big string (as it is the case for
win32 applications), so I was very surprised at first why my snipped
from above did not work and I suppose a lot of people would expect it
to behave in the natural way (= splitting the arguments).




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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ