From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 7362A385C414 for ; Wed, 21 Jul 2021 11:43:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7362A385C414 Received: by mail-pj1-x102e.google.com with SMTP id bt15so1502476pjb.2 for ; Wed, 21 Jul 2021 04:43:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1sI1eCYFZ4xxFxRlfstDyxwfTkzSDtljpeCxlHnCuaM=; b=Md55V4Z1nuU50u+hMdBKWf4HrWigz+5jH+fcsXwgsKKevihMfzD518IacDRkBRv3JQ wmYlTf16AgLoI4AyDaXPeLoJL84/qWfcg7T5QX9I1PJMS5rSg3DEVecuFt1a1udOLsc7 TBphnFiQ0T036RbTshvxqCHfyW84QdMmThOa865fL60Gp1QQ/QIPKQah9rlnpzkdpOHZ gOhtTAaT99gPd/FHEoVfy/nNy10twMy3myaJdpAcVpfxTNzi1GFKzhsgFSIRsyuQD03D 0/yNLFRp17vae43ouI4tU48bxpWriY+ttY6h8Uua9mZpAuK7JpqZHpIKTsNVhd+mWiZ0 zD5A== X-Gm-Message-State: AOAM530yrGGcOvf0CrFkqMMBP2RwKSjWasuvW22v20KdIuwu3AhTuPcL pw0ADtcR7AfEru3FQpkLlWQmxtHYzhk9ntr8uwyHzWOF X-Google-Smtp-Source: ABdhPJyA0ay0GfTBMsXFLIw2zVtPOQ4VEI75zGb/OtSaFBvD7A1Gud14N7EfJhbDecYh07Ckw5UpjUP0aT0HIjb+TjI= X-Received: by 2002:a17:90a:fe17:: with SMTP id ck23mr3457042pjb.6.1626867780553; Wed, 21 Jul 2021 04:43:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:c5c7:0:0:0:0 with HTTP; Wed, 21 Jul 2021 04:42:59 -0700 (PDT) From: Ev Drikos Date: Wed, 21 Jul 2021 14:42:59 +0300 Message-ID: Subject: Incorrect expansion of a program argument that is a special character? To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 11:43:02 -0000 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 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; }