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 PAA19736; Tue, 14 May 2002 15:50:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA19732 for ; Tue, 14 May 2002 15:50:12 +0200 (MET DST) Received: from hirsch.in-berlin.de (hirsch.in-berlin.de [192.109.42.6]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g4EDoB904685 for ; Tue, 14 May 2002 15:50:11 +0200 (MET DST) Received: from hirsch.in-berlin.de (localhost [127.0.0.1]) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id g4EDo4Fu025279 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT); Tue, 14 May 2002 15:50:04 +0200 Received: (from uucp@localhost) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with UUCP id g4EDo2jv025269; Tue, 14 May 2002 15:50:02 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: caml-list@inria.fr Received: from localhost (oliver@localhost) by first.in-berlin.de (8.7.6/8.7.3) with SMTP id PAA00511; Tue, 14 May 2002 15:30:07 +0200 Date: Tue, 14 May 2002 15:30:06 +0200 (MET DST) From: Oliver Bandel To: Jens Olsson cc: caml-list@inria.fr Subject: Re: [Caml-list] Wildcard expansion/command line In-Reply-To: <20020514075059.30862.qmail@operamail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, On Tue, 14 May 2002, Jens Olsson wrote: > 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 exam ple at the bottom of my mail to clarify if it is unclear what I mean. [...] > 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. This is typical bwehaviour of unix-shells, and that's what they are good for. That's, why working with shells is so easy. :) If you don't want that behaviour, write your own shell, or let your program explicitly read the arguments in. Ciao, Oliver ------------------- 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