delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/12/21:24:42

Date: Sun, 12 Oct 1997 18:21:59 -0700 (PDT)
Message-Id: <199710130121.SAA19896@adit.ap.net>
Mime-Version: 1.0
To: Chris Frolik <frolikcc AT indy DOT net>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: A simple program

At 03:30  10/12/1997 -0500, Chris Frolik wrote:
>I tried compiling/running the following program:
>[snipped]
>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.  Is this because of DJGPP, or the
>way DOS passes the command line?
It's DJGPP. The reason for this is to make the behavior more Unix-like. In
Unix, the shell does this expansion. Read FAQ section 16.1 for more info,
and 16.2 for how to get around it. (The easiest way is to quote the args.)

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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