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-20 (10:49)
From: Brock <awwaiid@d...>
Subject: Re: [Caml-list] command arguments sticking together
This is getting close to what I need, and indeed solves the
multiple-arguments-stuck-into-a-single-argument problem. What I'm trying to do
is take the program mhtml (which is written in caml) and allow it to be used as
a script interpreter for MacroHTML. The body of such a script could be
something as simple as:

#!/usr/bin/mhtml -I /path/to/include/files

And the idea is that the body of the script should be passed to mhtml through
stdin, just like with the other interpreters. The problem I'm having with the
suggested solution is that mhtml is not getting the rest of the file through
stdin like I expect it to. I tried to do this:

exec mhtml arg1 arg2 arg3 ...

but mhtml is not getting the data, instead mhtml is trying to get input from
the real stdin. I tried to make a sort of wrapper script but have been
unsuccesfull so far... the wrapper looked like this:

exec mhtml $@

And then the body of the .mhtml file I want interpreted would look like:
#!/path/to/wrapper -I /path/to/include/files

But then I get the shell trying to interpret the data part (the html stuff) of
the file! Any tips would be appreciated. Possibly a better solution would be to
get ocaml to parse the arguments even if they are all stuck together?


On 2002., Christopher Quinn wrote:
|What I meant is actually:
|# (*
|exec myscript a b c ....
|caml code...
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: