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 JAA10346; Tue, 14 May 2002 09:57:04 +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 JAA10341 for caml-list@pauillac.inria.fr; Tue, 14 May 2002 09:57:04 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA10135 for ; Tue, 14 May 2002 09:51:01 +0200 (MET DST) Received: from ws4-2.us4.outblaze.com (205-158-62-67.outblaze.com [205.158.62.67]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id g4E7p0n22214 for ; Tue, 14 May 2002 09:51:00 +0200 (MET DST) Received: (qmail 30863 invoked by uid 1001); 14 May 2002 07:50:59 -0000 Message-ID: <20020514075059.30862.qmail@operamail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [213.67.81.250] by ws4-2.us4.outblaze.com with http for jenso@operamail.com; Tue, 14 May 2002 08:50:59 +0100 From: "Jens Olsson" To: caml-list@inria.fr Date: Tue, 14 May 2002 08:50:59 +0100 Subject: [Caml-list] Wildcard expansion/command line X-Originating-Ip: 213.67.81.250 X-Originating-Server: ws4-2.us4.outblaze.com Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, This is my second time at the list. Feel good to be back :) Hope all of you are well! I have a question right away. It might not (probably not) be a Ocaml related question but I'll give it a shot! I write a program that is invoked from the command line. All well, but when I was starting to make my program deal with wildcards I realized that the ocaml program gets its command line arguments expanded (if wildcards are used). I have included an example at the bottom of my mail to clarify if it is unclear what I mean. Now, is this done by the OS or the shell? How do I controll this behaviour? Of course I can enclose any arguments within "" and expand any wildcards manually - but I figured, if programs like 'ls' don't have to use quotes, why should I. So, how does it work? regards Jens Example: If a directory has two files m1.txt and m2.txt, and my ocaml program (here called myprog) is invoked with wildcards it would behave something like this: Example call Command line arg within my program ./myprog m* -> Sys.argv.(1) = "m1.txt" ./myprog m?.txt -> Sys.argv.(1) = "m1.txt" ./myprog "m*" -> Sys.argv.(1) = "m*" ie, wildcards are expanded before given to my program. -- Powered by Outblaze ------------------- 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