Xref: utzoo comp.lang.c:9371 comp.unix.wizards:7805 Path: utzoo!mnetor!uunet!mcvax!enea!zyx!aj From: aj@zyx.UUCP (Arndt Jonasson) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: command line options Message-ID: <2478@zyx.UUCP> Date: 14 Apr 88 20:39:07 GMT References: <2414@zyx.UUCP> <8039@elsie.UUCP> <7628@brl-smoke.ARPA> <143@gsg.UUCP> <7634@brl-smoke.ARPA> <524@vsi.UUCP> Reply-To: aj@zyx.UUCP (Arndt Jonasson) Organization: ZYX Sweden AB, Stockholm, Sweden Lines: 33 In article <524@vsi.UUCP> sullivan@vsi.UUCP (Michael T Sullivan) writes: >In article <7634@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: >> >> You miss the point; -? already has the desired property; it does not > >But using -? only _has_ to say that -? is a bad option. You are relying >on the fact that all programs have good usage messages. Some just say >"Bad option" and die (none of mine do, of course :-). I don't have much of an opinion in this matter, so I'll provide some statistics instead. I tried calling all programs in /bin in a SysV.2 compatible system with -? as the single argument, and found the following: characteristic number of programs Print a usage line (or several) 36 Ignore it completely, although they do take options 5 Just say "bad option" in one way or another 14 Do something else 6 Don't count, since they don't take any options, and thus don't watch out for any 17 The total winner in silliness is 'wc': it does give a usage message, but only after the user has entered end-of-file! -- Arndt Jonasson, ZYX Sweden AB, Styrmansgatan 6, 114 54 Stockholm, Sweden email address: aj@zyx.SE or !mcvax!enea!zyx!aj