Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Filename.quote - again
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-19 (12:17)
From: Florian Hars <florian@h...>
Subject: Re: [Caml-list] command arguments sticking together
begin  Jacques Garrigue quote:
> > #!/myscript option1 option2 ...
> > 
> > The problem is that I am using the included Arg module to parse the arguments,
> > but when myscript is called it only sees one argument consisting of all the
> > arguments stuffed together... which the Arg routines don't care for much.
> Could you explain a bit more what is your problem?

His problem is that he is using Unix or a shell that behaves as
a Unix-shell:

       If the program is a file beginning with #!, the  remainder
       of  the  first  line specifies an interpreter for the pro­
       gram.  The shell executes  the  specified  interpreter  on
       operating  systems that do not handle this executable for­
       mat themselves.  The arguments to the interpreter  consist
       of  a  single  optional argument following the interpreter
       name on the first line of the  program,  followed  by  the
       name of the program, followed by the command arguments, if

This is from the bash man page, but other shells should do the same thing, 
and it is the normal behaviour for #!-scripts under Unix.

Yours, Florian.
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: