Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!aioe.org!.POSTED!not-for-mail From: pu Newsgroups: comp.lang.c Subject: Re: Command line arguments Date: Thu, 10 Jan 2013 22:02:45 +0100 Organization: Aioe.org NNTP Server Lines: 28 Message-ID: <50EF2C75.8080309@gmail.com> References: NNTP-Posting-Host: gKbGshfZgipPVyNwqjXUSA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.c:29907 On 10/01/2013 21:58, BartC wrote: > I've just discovered that a single command line argument containing > wildcards, such as *.c, is expanded to a full list of matching files before > it gets to main(). > > That isn't really what I want (and there could be thousands of matching > files, which I may not want to deal with in my C program, but pass on to > something else, or the argument may not be a file specification at all). > > Is there any way this behaviour can be changed, without needing to write > arguments in a special way? > > (On Windows, I can choose to use the WinMain entry point instead; but > this won't work under Linux, assuming that that also expands.) > put the argument between quotes ===pu@pumbair:~:502=== echo * Calibre Library Desktop Documents Downloads Dropbox Library Movies Music Pictures Projects Public Sites Software System test ===pu@pumbair:~:503=== echo "*" * ===pu@pumbair:~:504=== echo '*' *