From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA03890; Sat, 20 Apr 2002 12:49:47 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA03894 for caml-list@pauillac.inria.fr; Sat, 20 Apr 2002 12:49:46 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA27735 for ; Fri, 19 Apr 2002 21:42:50 +0200 (MET DST) Received: from mailgate1.nau.edu (mailgate1.nau.edu [134.114.96.58]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g3JJgh106886 for ; Fri, 19 Apr 2002 21:42:49 +0200 (MET DST) Received: from CONVERSION-DAEMON.mailgate1.nau.edu by mailgate1.nau.edu (PMDF V6.1-1 #39126) id <0GUT00K01YQZKF@mailgate1.nau.edu> for caml-list@inria.fr; Fri, 19 Apr 2002 12:42:42 -0700 (MST) Received: from deathonastick.org (student2231.student.nau.edu [134.114.183.105]) by mailgate1.nau.edu (PMDF V6.1-1 #39126) with SMTP id <0GUT00J23YQL4F@mailgate1.nau.edu>; Fri, 19 Apr 2002 12:42:21 -0700 (MST) Received: by deathonastick.org (sSMTP sendmail emulation); Fri, 19 Apr 2002 19:39:47 +0000 Date: Fri, 19 Apr 2002 19:39:47 +0000 From: Brock Subject: Re: [Caml-list] command arguments sticking together In-reply-to: <"from cq"@htec.demon.co.uk> To: Christopher Quinn Cc: caml-list@inria.fr Message-id: <20020419193947.A1565@deathonastick.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <20020419055857.E12446@deathonastick.org> <20020419182233V.garrigue@kurims.kyoto-u.ac.jp> <20020419122151.GA31540@bik-gmbh.de> <3CC01529.2090900@htec.demon.co.uk> <3CC01C92.6010606@htec.demon.co.uk> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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

Hello!

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: #!/bin/sh exec mhtml arg1 arg2 arg3 ... data... 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: #!/bin/sh exec mhtml $@ And then the body of the .mhtml file I want interpreted would look like: #!/path/to/wrapper -I /path/to/include/files

hello

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? --Brock On 2002.04.19.14.33, Christopher Quinn wrote: |What I meant is actually: | |#!/bin/sh |# (* |exec myscript a b c .... |*) |caml code... ... ------------------- 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