Template Version: @(#)onepager.txt 1.29 04/11/15 SMI

This information is 

1. Introduction
   1.1. Project/Component Working Name:
    
    getopts

   1.2. Name of Document Author/Supplier:

    Joe Kowalski

   1.3. Date of This Document:

    Aug 7, 2006 (part of OpenSolaris cleanup effort)

2. Project Summary
   2.1. Project Description:

    Command Line Interface Syntax Standard 

4. Technical Description:
    4.1. Details:

    --------------------------------------------------------------------------
    I don't know if you would like me present for the discussion of these
    or if you can just 'yea' or 'nea' on these. Of course, you can edit the
    text and then 'yea' or 'nea' if you prefer. I can also attend the meeting
    to discuss these if you like.
    --------------------------------------------------------------------------

    I'd like PSARC to official endorse the following policy:

	    "All new commands and utilities introduced into the Platform
	     Software Consolidation will adhear to the USL Command Syntax
	     Standard (aka: getopts rules). Furthermore, any command or
	     utility produced by a third party which is to be 'bought back'
	     into the Platform Software Consolidation will adhear to these
	     rules. All pre-existing commands and utilities which have been
	     released to the field by XX/YY/91 are grandfathered and exempt
	     from this rule."

    See getopt(BA_LIB) in the SVID or intro 1 in the manual pages. The getopt
    library functions and utilities are intended to facilitate writing programs
    to the standard.
     
    The following is from the intro 1 manual page of the SVr4 documentation.

    - jek3
     
      Command Syntax Standard:  Rules
	 These command syntax rules are not followed by  all  current
	 commands,  but  all new commands will obey them.  getopts(1)
	 should be used by all shell procedures to  parse  positional
	 parameters  and  to  check  for  legal options.  It supports
	 Rules 3-10 below.  The enforcement of the other  rules  must
	 be done by the command itself.

	      1.   Command names (name above) must be between two and
		   nine characters long.

	      2.   Command names must include only lower-case letters
		   and digits.

	      3.   Option names (option above) must be one  character
		   long.

	      4.   All options must be preceded by ``-''.

	      5.   Options with no arguments may be grouped  after  a
		   single ``-''.

	      6.   The first option-argument (optarg above) following
		   an option must be preceded by white space.

	      7.   Option-arguments cannot be optional.

	      8.   Groups of  option-arguments  following  an  option
		   must either be separated by commas or separated by
		   white space and quoted (e.g., -o xxx,z,yy  or   -o
		   "xxx z yy").

	      9.   All options must precede operands  (cmdarg  above)
		   on the command line.

	      10.  ``--'' may be used to  indicate  the  end  of  the
		   options.

	      11.  The order of the options relative to  one  another
		   should not matter.

	      12.  The relative order of the operands (cmdarg  above)
		   may  affect  their significance in ways determined
		   by the command with which they appear.

	      13.  ``-'' preceded and followed by white space  should
		   only be used to mean standard input.

