public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Incorrect expansion of a program argument that is a special character?
@ 2021-07-21 11:42 Ev Drikos
  2021-07-21 12:18 ` Russell VT
  2021-07-21 15:44 ` Brian Inglis
  0 siblings, 2 replies; 4+ messages in thread
From: Ev Drikos @ 2021-07-21 11:42 UTC (permalink / raw)
  To: cygwin

Hello,

When I run the program below from my home directory in a PowerShell
Console (Windows 8-1) I've to use an extra backslash character as
shown below or the star is expanded. Which happens only when the
program has been compiled in Cygwin.

Is this a bug or a known feature?

Ev. Drikos

----------------------------------------------
PS C:\Users\suser> .\args.exe '\*'

*
argc=1
PS C:\Users\suser>
----------------------------------------------

#include <stdio.h>
int main(int argc, char *argv[]){
int i;
for (i=1; i < argc; i++) {
  printf("\n%s",argv[i]);
}//for
 printf("\nargc=%d\n",argc-1);
return 0;
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-21 15:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 11:42 Incorrect expansion of a program argument that is a special character? Ev Drikos
2021-07-21 12:18 ` Russell VT
     [not found]   ` <CAK5_-8oOKuSQd35f2KF=q7Xy5mMQkukEUJa_dja+1WtHUGMcRQ@mail.gmail.com>
2021-07-21 14:21     ` Fwd: " Ev Drikos
2021-07-21 15:44 ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).