lkml.org 
[lkml]   [1999]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Script interpreter arguments
    From: "Khimenko Victor" <khim@sch57.msk.ru>

It's possible to specify optional argument to interpreter in script:
-- cut --
#!/usr/bin/perl -w
-- cut --
but not possible to specify two arguments
-- cut --
#!/usr/bin/eperl -B=<!--eperl -E=-->
-- cut --

Why ? It's very annoying :-(( What POSIX says on subject ?

Why?

It is like this: if you have a script called bar, that starts with

#!/some/patch/foo lots of arguments

and the script is invoked using

/some/other/path/bar

then the program /some/patch/foo is called with precisely three arguments:
0: "foo"
1: "lots of arguments"
2: "/some/other/path/bar"

In other words: a space does not separate arguments here.
See also fs/binfmt_script.c.


POSIX?
"Some systems can exec shell scripts. This functionality
is outside the scope of this document."


Andries

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

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.037 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site