command line options

Arthur David Olson ado at elsie.UUCP
Fri Apr 8 08:57:46 AEST 1988


> > I want some uniform way of getting programs to output their usage messages.
> 
> Under the existing getopts scheme, typing
> 	command -?
> is guaranteed to get the usage message.

A problem and a two questions.  First, the problem:

		Script started on Thu Apr  7 18:51:58 1988
		$ grep UNIX /vmunix
		4.3 BSD UNIX #25: 12/12 02:45:12 PM
		$ man getopts
		No manual entry for getopts.
		$ exit

		script done on Thu Apr  7 18:52:34 1988

Second, the questions.  Is a public-domain implementation of "the existing
getopts scheme," or at least a public-domain manual page, available?  And
is the scheme idiot-proof enough to work when executed in directories with
files named, for example, "-l"?
-- 
	ado at ncifcrf.gov			ADO is a trademark of Ampex.



More information about the Comp.lang.c mailing list