Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: [command line arguments] more elegant solution ?? Date: Sun, 11 Dec 2016 19:02:50 -0800 Organization: None to speak of Lines: 35 Message-ID: References: <871sxew6n8.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="5ae493c5c0eddd0692ad00c7942bf15f"; logging-data="27278"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IDS0NkzhW0t3o2uZa/6EI" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:Lvwp9ryqlkJrnJwQlf0/5DwiNrs= sha1:jFpNAcU0qCCu1umZubCFBI7Ncag= Xref: csiph.com comp.lang.c:98974 BartC writes: [...] > But hang on... I've just noticed you put quotes around the argument: > > >>> 18:55 $ Args '*' > > So THAT'S why you didn't get a big list of files. I should have read this before posting my previous followup. > Sorry, but that's not allowed. Sorry, but that's just too bad. > My objection was that if someone > accidentally types * instead of a number, it might, in some extreme > circumstances, go wrong. (In that the program thinks the input is valid.) Yup. That's the way it is. > What you seem to be saying is, it's OK because people just have to make > sure they accidentally type '*' instead! That would be very considerate > of them... I'm not sure what point you're making, but Unix shells work the way they work, and complaining about that isn't going to do anyone any good. And unlike your complaining about C, it isn't even vaguely topical. I'm discussing it only because it's relevant to how to invoke C programs. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"