Xref: utzoo comp.lang.c:8995 comp.unix.wizards:7635 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: command line options Message-ID: <8040@elsie.UUCP> Date: 7 Apr 88 22:57:46 GMT References: <2414@zyx.UUCP> <8039@elsie.UUCP> <7628@brl-smoke.ARPA> Organization: NIH-LEC, Bethesda, MD Lines: 22 > > 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@ncifcrf.gov ADO is a trademark of Ampex.