command line options

Arndt Jonasson aj at zyx.UUCP
Fri Apr 15 06:39:07 AEST 1988


In article <524 at vsi.UUCP> sullivan at vsi.UUCP (Michael T Sullivan) writes:
>In article <7634 at brl-smoke.ARPA>, gwyn at 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 at zyx.SE	or	<backbone>!mcvax!enea!zyx!aj



More information about the Comp.unix.wizards mailing list