diff options
Diffstat (limited to 'usr/src/man/man1/getopts.1')
-rw-r--r-- | usr/src/man/man1/getopts.1 | 76 |
1 files changed, 13 insertions, 63 deletions
diff --git a/usr/src/man/man1/getopts.1 b/usr/src/man/man1/getopts.1 index a2f8d74058..39d7ef2f09 100644 --- a/usr/src/man/man1/getopts.1 +++ b/usr/src/man/man1/getopts.1 @@ -3,14 +3,14 @@ .\" Copyright 1992, X/Open Company Limited All Rights Reserved .\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved .\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH getopts 1 "2 Nov 2007" "SunOS 5.11" "User Commands" +.TH GETOPTS 1 "Nov 2, 2007" .SH NAME getopts \- parse utility options .SH SYNOPSIS @@ -339,59 +339,49 @@ an SCCS or CVS identification string. Zero or more flags with optional number values can be specified to control option parsing. The flags are: .sp .ne 2 -.mk .na \fB\fBc\fR\fR .ad .RS 5n -.rt Cache this \fIoptstring\fR for multiple passes. Used to optimize built-ins that can be called many times within the same process. .RE .sp .ne 2 -.mk .na \fB\fBi\fR\fR .ad .RS 5n -.rt Ignore this \fIoptstring\fR when generating help. Used when combining \fIoptstring\fR values from multiple passes. .RE .sp .ne 2 -.mk .na \fB\fBl\fR\fR .ad .RS 5n -.rt Display only long option names in help messages. .RE .sp .ne 2 -.mk .na \fB\fBo\fR\fR .ad .RS 5n -.rt The \fB-\fR option character prefix is optional. This supports the obsolete \fBps\fR(1) option syntax. .RE .sp .ne 2 -.mk .na \fB\fBp\fR\fR .ad .RS 5n -.rt The number specifies the number of \fB-\fR characters that must prefix long option names. The default is \fB2\fR. \fB0\fR, \fB1\fR or \fB2\fR are accepted, for example \fBp0\fR for \fBdd\fR(1M) and \fBp1\fR for \fBfind\fR(1). @@ -399,12 +389,10 @@ for example \fBp0\fR for \fBdd\fR(1M) and \fBp1\fR for \fBfind\fR(1). .sp .ne 2 -.mk .na \fB\fBs\fR\fR .ad .RS 5n -.rt The number specifies the manual page section number, \fB1\fR by default. .RE @@ -528,89 +516,73 @@ used. usage and detailed descriptions. Specify \fIargs\fR as: .sp .ne 2 -.mk .na \fB\fB-?\fR\fR .ad .RS 13n -.rt Use this to generate a usage synopsis. .RE .sp .ne 2 -.mk .na \fB\fB--??\fR\fR .ad .RS 13n -.rt Use this to generate a verbose usage message. .RE .sp .ne 2 -.mk .na \fB\fB--??man\fR\fR .ad .RS 13n -.rt Use this to generate a formatted manual page. .RE .sp .ne 2 -.mk .na \fB\fB--??api\fR\fR .ad .RS 13n -.rt Use this to generate an easy to parse usage message. .RE .sp .ne 2 -.mk .na \fB\fB--??html\fR\fR .ad .RS 13n -.rt Use this to generate a man page in \fBhtml\fR format. .RE .sp .ne 2 -.mk .na \fB\fB--??nroff\fR\fR .ad .RS 13n -.rt Use this to generate a man page in \fBnroff\fR format. .RE .sp .ne 2 -.mk .na \fB\fB--??usage\fR\fR .ad .RS 13n -.rt Use this to list the current \fBoptstring\fR. .RE .sp .ne 2 -.mk .na \fB\fB--???name\fR\fR .ad .RS 13n -.rt Use this to list \fBversion=\fR\fIn\fR, where \fIn\fR is greater than \fB0\fR, if the option \fIname\fR is recognized by \fBgetopts\fR. .RE @@ -627,12 +599,10 @@ of the first non-option argument. The following options are supported by \fBksh93\fR: .sp .ne 2 -.mk .na \fB\fB-a\fR \fIname\fR\fR .ad .RS 11n -.rt Use \fIname\fR instead of the command name in usage messages. .RE @@ -642,12 +612,10 @@ Use \fIname\fR instead of the command name in usage messages. The following operands are supported: .sp .ne 2 -.mk .na \fB\fIoptstring\fR\fR .ad .RS 13n -.rt A string containing the option characters recognised by the utility invoking \fBgetopts\fR. If a character is followed by a colon, the option is expected to have an argument, which should be supplied as a separate argument. Applications @@ -667,12 +635,10 @@ option character is not known or an option-argument is missing. .sp .ne 2 -.mk .na \fB\fIname\fR\fR .ad .RS 13n -.rt The name of a shell variable that is set by the \fBgetopts\fR utility to the option character that was found. .RE @@ -790,24 +756,20 @@ that affect the execution of \fBgetopts\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .sp .ne 2 -.mk .na \fB\fBOPTIND\fR\fR .ad .RS 10n -.rt This variable is used by \fBgetopts\fR as the index of the next argument to be processed. .RE .sp .ne 2 -.mk .na \fB\fBOPTARG\fR\fR .ad .RS 10n -.rt This variable is used by \fBgetopts\fR to store the argument if an option is using arguments. .RE @@ -818,23 +780,19 @@ using arguments. The following exit values are returned: .sp .ne 2 -.mk .na \fB\fB0\fR\fR .ad .RS 6n -.rt An option, specified or unspecified by \fIoptstring\fR, was found. .RE .sp .ne 2 -.mk .na \fB\fB>0\fR\fR .ad .RS 6n -.rt The end of options was encountered or an error occurred. .RE @@ -844,34 +802,28 @@ The end of options was encountered or an error occurred. The following exit values are returned by \fBksh93\fR: .sp .ne 2 -.mk .na \fB\fB0\fR\fR .ad .RS 5n -.rt A specified option was found. .RE .sp .ne 2 -.mk .na \fB\fB1\fR\fR .ad .RS 5n -.rt An end of options was encountered. .RE .sp .ne 2 -.mk .na \fB\fB2\fR\fR .ad .RS 5n -.rt A usage or information message was generated. .RE @@ -884,15 +836,14 @@ See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS -tab() box; -cw(2.75i) |cw(2.75i) -lw(2.75i) |lw(2.75i) -. -ATTRIBUTE TYPEATTRIBUTE VALUE +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE _ -Interface StabilityCommitted +Interface Stability Committed _ -StandardSee \fBstandards\fR(5). +Standard See \fBstandards\fR(5). .TE .SS "ksh93" @@ -900,13 +851,12 @@ StandardSee \fBstandards\fR(5). .sp .TS -tab() box; -cw(2.75i) |cw(2.75i) -lw(2.75i) |lw(2.75i) -. -ATTRIBUTE TYPEATTRIBUTE VALUE +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE _ -Interface StabilityUncommitted +Interface Stability Uncommitted .TE .SH SEE ALSO |