#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages-posix/man1p/getopts.1p:2 #, no-wrap msgid "GETOPTS" msgstr "" #. type: TH #: man-pages-posix/man1p/getopts.1p:2 #, no-wrap msgid "2013" msgstr "" #. type: TH #: man-pages-posix/man1p/getopts.1p:2 #, no-wrap msgid "IEEE/The Open Group" msgstr "" #. type: TH #: man-pages-posix/man1p/getopts.1p:2 #, no-wrap msgid "POSIX Programmer's Manual" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:3 #, no-wrap msgid "PROLOG" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:8 msgid "" "This manual page is part of the POSIX Programmer's Manual. The Linux " "implementation of this interface may differ (consult the corresponding Linux " "manual page for details of Linux behavior), or the interface may not be " "implemented on Linux." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:9 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:12 msgid "getopts \\(em parse utility options" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:12 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:16 #, no-wrap msgid "getopts IB<[>I...B<]>\n" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:17 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:24 msgid "" "The I utility shall retrieve options and option-arguments from a " "list of parameters. It shall support the Utility Syntax Guidelines 3 to 10, " "inclusive, described in the Base Definitions volume of POSIX.1\\(hy2008, " "I
, I." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:36 msgid "" "Each time it is invoked, the I utility shall place the value of the " "next option in the shell variable specified by the I operand and the " "index of the next argument to be processed in the shell variable I. " "Whenever the shell is invoked, I shall be initialized to 1." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:45 msgid "" "When the option requires an option-argument, the I utility shall " "place it in the shell variable I. If no option was found, or if the " "option that was found does not have an option-argument, I shall be " "unset." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:72 msgid "" "If an option character not contained in the I operand is found " "where an option character is expected, the shell variable specified by " "I shall be set to the Equestion-markE (B<'?'>) character. In " "this case, if the first character in I is a EcolonE (B<':" "'>), the shell variable I shall be set to the option character " "found, but no output shall be written to standard error; otherwise, the " "shell variable I shall be unset and a diagnostic message shall be " "written to standard error. This condition shall be considered to be an error " "detected in the way arguments were presented to the invoking application, " "but shall not be an error in I processing." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:74 msgid "If an option-argument is missing:" msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:74 man-pages-posix/man1p/getopts.1p:86 man-pages-posix/man1p/getopts.1p:244 man-pages-posix/man1p/getopts.1p:264 man-pages-posix/man1p/getopts.1p:269 #, no-wrap msgid " *" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:86 msgid "" "If the first character of I is a EcolonE, the shell " "variable specified by I shall be set to the EcolonE character " "and the shell variable I shall be set to the option character found." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:100 msgid "" "Otherwise, the shell variable specified by I shall be set to the " "Equestion-markE character, the shell variable I shall be " "unset, and a diagnostic message shall be written to standard error. This " "condition shall be considered to be an error detected in the way arguments " "were presented to the invoking application, but shall not be an error in " "I processing; a diagnostic message shall be written as stated, but " "the exit status shall be zero." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:119 msgid "" "When the end of options is encountered, the I utility shall exit " "with a return value greater than zero; the shell variable I shall be " "set to the index of the first operand, or the value B<\"$#\">+1 if there are " "no operands; the I variable shall be set to the Equestion-" "markE character. Any of the following shall identify the end of options: " "the first B<\"\\(mi\\|\\(mi\"> argument that is not an option-argument, " "finding an argument that is not an option-argument and does not begin with a " "B<'\\(mi'>, or encountering an error." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:127 msgid "" "The shell variables I and I shall be local to the caller of " "I and shall not be exported by default." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:136 msgid "" "The shell variable specified by the I operand, I, and " "I shall affect the current shell execution environment; see " "I
, I." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:151 msgid "" "If the application sets I to the value 1, a new set of parameters " "can be used: either the current positional parameters or new I values. " "Any other attempt to invoke I multiple times in a single shell " "execution environment with parameters (positional parameters or I " "operands) that are not the same in all invocations, or with an I " "value modified to be a value other than 1, produces unspecified results." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:151 #, no-wrap msgid "OPTIONS" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:153 man-pages-posix/man1p/getopts.1p:204 man-pages-posix/man1p/getopts.1p:275 man-pages-posix/man1p/getopts.1p:277 man-pages-posix/man1p/getopts.1p:420 msgid "None." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:153 #, no-wrap msgid "OPERANDS" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:155 msgid "The following operands shall be supported:" msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:155 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:189 msgid "" "A string containing the option characters recognized by the utility invoking " "I. If a character is followed by a EcolonE, the option " "shall be expected to have an argument, which should be supplied as a " "separate argument. Applications should specify an option character and its " "option-argument as separate arguments, but I shall interpret the " "characters following an option character requiring arguments as an argument " "whether or not this is done. An explicit null option-argument need not be " "recognized if it is not supplied as a separate argument when I is " "invoked. (See also the I() function defined in the System " "Interfaces volume of POSIX.1\\(hy2008.) The characters Equestion-" "markE and EcolonE shall not be used as option characters by an " "application. The use of other option characters that are not alphanumeric " "produces unspecified results. If the option-argument is not supplied as a " "separate argument from the option character, the value in I shall be " "stripped of the option character and the B<'\\(mi'>. The first character in " "I determines how I behaves if an option character is not " "known or an option-argument is missing." msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:189 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:193 msgid "" "The name of a shell variable that shall be set by the I utility to " "the option character that was found." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:200 msgid "" "The I utility by default shall parse positional parameters passed " "to the invoking shell procedure. If Is are given, they shall be parsed " "instead of the positional parameters." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:200 #, no-wrap msgid "STDIN" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:202 man-pages-posix/man1p/getopts.1p:235 msgid "Not used." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:202 #, no-wrap msgid "INPUT FILES" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:204 #, no-wrap msgid "ENVIRONMENT VARIABLES" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:207 msgid "" "The following environment variables shall affect the execution of I:" "" msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:207 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:213 msgid "" "Provide a default value for the internationalization variables that are " "unset or null. (See the Base Definitions volume of POSIX.1\\(hy2008, " "I
, I for the precedence of " "internationalization variables used to determine the values of locale " "categories.)" msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:213 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:216 msgid "" "If set to a non-empty string value, override the values of all the other " "internationalization variables." msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:216 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:220 msgid "" "Determine the locale for the interpretation of sequences of bytes of text " "data as characters (for example, single-byte as opposed to multi-byte " "characters in arguments and input files)." msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:220 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:224 msgid "" "Determine the locale that should be used to affect the format and contents " "of diagnostic messages written to standard error." msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:224 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:227 msgid "" "Determine the location of message catalogs for the processing of " "I." msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:227 #, no-wrap msgid "I" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:231 msgid "" "This variable shall be used by the I utility as the index of the " "next argument to be processed." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:231 #, no-wrap msgid "ASYNCHRONOUS EVENTS" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:233 man-pages-posix/man1p/getopts.1p:287 msgid "Default." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:233 #, no-wrap msgid "STDOUT" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:235 #, no-wrap msgid "STDERR" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:244 msgid "" "Whenever an error is detected and the first character in the I " "operand is not a EcolonE (B<':'>), a diagnostic message shall be " "written to standard error with the following information in an unspecified " "format:" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:252 msgid "" "The invoking program name shall be identified in the message. The invoking " "program name shall be the value of the shell special parameter 0 (see " "I
, I) at the time the I utility " "is invoked. A name equivalent to:" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:258 #, no-wrap msgid "B<\n" "basename \"$0\">\n" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:263 msgid "may be used." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:269 msgid "" "If an option is found that was not specified in I, this error is " "identified and the invalid option character shall be identified in the " "message." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:273 msgid "" "If an option requiring an option-argument is found, but an option-argument " "is not found, this error shall be identified and the invalid option " "character shall be identified in the message." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:273 #, no-wrap msgid "OUTPUT FILES" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:275 #, no-wrap msgid "EXTENDED DESCRIPTION" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:277 #, no-wrap msgid "EXIT STATUS" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:279 msgid "The following exit values shall be returned:" msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:279 #, no-wrap msgid "\\00" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:283 msgid "An option, specified or unspecified by I, was found." msgstr "" #. type: IP #: man-pages-posix/man1p/getopts.1p:283 #, no-wrap msgid "E0" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:285 msgid "The end of options was encountered or an error occurred." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:285 #, no-wrap msgid "CONSEQUENCES OF ERRORS" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:289 msgid "I" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:289 #, no-wrap msgid "APPLICATION USAGE" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:295 msgid "" "Since I affects the current shell execution environment, it is " "generally provided as a shell regular built-in. If it is called in a " "subshell or separate utility execution environment, such as one of the " "following:" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:302 #, no-wrap msgid "" "B<\n" "(getopts abc value \"$@\")\n" "nohup getopts ...\n" "find . \\(miexec getopts ... \\e;>\n" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:307 msgid "it does not affect the shell variables in the caller's environment." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:314 msgid "" "Note that shell functions share I with the calling shell even though " "the positional parameters are changed. If the calling shell and any of its " "functions uses I to parse arguments, the results are unspecified." msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:314 #, no-wrap msgid "EXAMPLES" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:316 msgid "The following example script parses and displays its arguments:" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:340 #, no-wrap msgid "" "B<\n" "aflag=\n" "bflag=\n" "while getopts ab: name\n" "do\n" " case $name in\n" " a) aflag=1;;\n" " b) bflag=1\n" " bval=\"$OPTARG\";;\n" " ?) printf \"Usage: %s: [\\(mia] [\\(mib value] args\\en\" $0\n" " exit 2;;\n" " esac\n" "done\n" "if [ ! \\(miz \"$aflag\" ]; then\n" " printf \"Option \\(mia specified\\en\"\n" "fi\n" "if [ ! \\(miz \"$bflag\" ]; then\n" " printf 'Option \\(mib \"%s\" specified\\en' \"$bval\"\n" "fi\n" "shift $(($OPTIND \\(mi 1))\n" "printf \"Remaining arguments are: %s\\en$*\">\n" msgstr "" #. type: SH #: man-pages-posix/man1p/getopts.1p:343 #, no-wrap msgid "RATIONALE" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:353 msgid "" "The I utility was chosen in preference to the System V I " "utility because I handles option-arguments containing " "EblankE characters." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:361 msgid "" "The I variable is not mentioned in the ENVIRONMENT VARIABLES section " "because it does not affect the execution of I; it is one of the few " "``output-only'' variables used by the standard utilities." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:375 msgid "" "The EcolonE is not allowed as an option character because that is " "not historical behavior, and it violates the Utility Syntax Guidelines. The " "EcolonE is now specified to behave as in the KornShell version of " "the I utility; when used as the first character in the I " "operand, it disables diagnostics concerning missing option-arguments and " "unexpected option characters. This replaces the use of the I " "variable that was specified in an early proposal." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:393 msgid "" "The formats of the diagnostic messages produced by the I utility " "and the I() function are not fully specified because " "implementations with superior (``friendlier'') formats objected to the " "formats used by some historical implementations. The standard developers " "considered it important that the information in the messages used be uniform " "between I and I(). Exact duplication of the messages might " "not be possible, particularly if a utility is built on another system that " "has a different I() function, but the messages must have specific " "information included so that the program name, invalid option character, and " "type of error can be distinguished by a user." msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:400 msgid "" "Only a rare application program intercepts a I standard error " "message and wants to parse it. Therefore, implementations are free to choose " "the most usable messages they can devise. The following formats are used by " "many historical implementations:" msgstr "" #. type: Plain text #: man-pages-posix/man1p/getopts.1p:405 #, no-wrap msgid "" "B<\n" "\"%s: illegal option \\(mi\\|\\(mi %c\\en\", E>IB, " "E>I