Browse thread
[Caml-list] Filename.quote - again
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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
any.
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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners