delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/28/15:25:11

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Ross Boulet" <ross AT rossb DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Wildcards in the path name parameter
Date: Sat, 28 May 2005 14:24:16 -0500
Message-ID: <008c01c563ba$e5882960$6400000a@RossLap>
MIME-Version: 1.0
In-Reply-To: <ba40711f0505260825118af461@mail.gmail.com>
X-IsSubscribed: yes

> On 26/05/05, Coetzee, Evert wrote:
> > But I'm running it from the cmd.exe command prompt. I'm
> not in a shell.
> >
> > cp: cannot stat `/cygdrive/c/*.*': No such file or
> directory
> >
> > That is the error I get now.
> 
> Do you have "noglob" in your CYGWIN environment variable?
> http://cygwin.com/problems.html
> 
> Lev
> 
Just to experiment with globbing, I created a small c
program to list the command line arguments.  I read where
the cygwin dll will do globbing for a program run from a
windoze command prompt, so I compiled with -mno-cygwin.
Much to my surprise, globbing is still occurring, even from
a windoze prompt.  How can this happen?


#include <stdio.h>

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

$ make
gcc -mno-cygwin -o parseline parseline.c

$ cygcheck parseline.exe
Found:
C:\cygwin\home\rossboulet\Program\c\parseline\parseline.exe
C:/cygwin/home/rossboulet/Program/c/parseline/parseline.exe
  C:\WINDOWS\system32\msvcrt.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll

$ ./parseline *
C:\cygwin\home\rossboulet\Program\c\parseline\parseline.exe
makefile
parseline.c
parseline.exe

$ cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\cygwin\home\rossboulet\Program\c\parseline>parseline *
parseline
makefile
parseline.c
parseline.exe





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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