delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/12/00:40:59

Message-ID: <344053D8.70C5@indy.net>
Date: Sat, 11 Oct 1997 23:36:40 -0500
From: Chris Frolik <frolikcc AT indy DOT net>
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: A really simple program

I tried compiling/running the following program:

/****************   TEST.C    *******************/

#include <stdio.h>

int main(int argc, char *argv[])
{
   int i;
   for (i=0 ; i<argc ; i++) printf("%s ", argv[i]);
   printf("\n");
   return 0;
}

/************************************************/

Then I tried typing the following command line:

       test *.c

And I didn't get the output I expected -- It printed out all of the
files in the directory with the extension ".C".  I can see how this can
be useful -- but what if I want to pass "*.c" literally as the first
argument? (which I want to be able to do in a program I wrote).  It
seems to me this is impossible to do.

-Chris Frolik
frolikcc AT indy DOT net

- Raw text -


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