delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/29/19:46:07

From: "Tony O'Bryan" <aho450s AT nic DOT smsu DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: *argv[] help!
Date: Thu, 29 Jan 1998 18:36:36 -0600
Organization: Southwest Missouri State University
Lines: 25
Message-ID: <34D12094.2582@nic.smsu.edu>
References: <Chameleon DOT 980129220158 DOT nrotem AT netvision DOT netvision>
Reply-To: aho450s AT nic DOT smsu DOT edu
NNTP-Posting-Host: marie.a40.smsu.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Noam Rotem wrote:
> 
> --- On 29 Jan 1998 06:58:46 GMT  George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
> wrote:
> 
> >DJGPP performs command-line globbing automatically, like Unix shells
> >do.  This means that if you give a wildcard on the command line it
> >will be expanded into the list of files matching the wildcard -- so in
> >your case argv[1] would be the first, argv[2] the second, etc.
> 
> Can I use the automatic globbing for more than one argument with wildcards?
> Let's say my command line is:
> 
> foo *.c *.bck
> 
> I guess I'll get the matching files of both arguments in argv[i], but how
> would I know then where goes the line between *.c's globbed arguments and
> *.bck's?

Because all the *.c files will come before all the *.bck files in your
example.  Just look for the break.
-- 
Tony O'Bryan

http://www.geocities.com/SiliconValley/Park/7201

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019