Mail Archives: djgpp/1998/01/31/03:15:25

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: *argv[] help!
Date: Fri, 30 Jan 1998 18:30:54 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 17
Message-ID: <>
References: <Chameleon DOT 980129220158 DOT nrotem AT netvision DOT netvision> <6asscp$5c4$6 AT news DOT ox DOT ac DOT uk>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

As a followup to this thread, I've written a couple of programs that
accept wildcards on the command line, and specify some sort of "target"
for an operation to be performed on these wildcards.  It might seem like
there's no way to tell, after expansion, which arguments are the sources
and which is the target, but that's not true at all.

If your program is of the form:  "foo <source(s)> <target>"; i.e., "copy
*.c ../backup", then the last argument on the command line will always
be the target, no matter how the source wildcard(s) were expanded.

| John M. Aldrich, aka Fighteer I  |     mailto:fighteer AT cs DOT com     |
| "Starting flamewars since 1993"  |  |
|  *** NOTICE ***  This .signature |       ICQ UIN#:  7406319       |
|  is generated randomly.  If you don't like it, sue my computer.   |

- Raw text -

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