msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2019-12-08 15:44+0900\n"
-"PO-Revision-Date: 2020-09-25 10:10+0900\n"
+"POT-Creation-Date: 2021-02-23 10:09+0900\n"
+"PO-Revision-Date: 2021-03-07 09:57+0900\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Linux JM project <linuxjm-discuss@lists.osdn.me>\n"
"Language: \n"
"Content-Transfer-Encoding: 8bit\n"
#. type: TH
-#: getopt.man:1
+#: getopt.1:1
#, no-wrap
msgid "GETOPT"
msgstr "GETOPT"
#. type: TH
-#: getopt.man:1
+#: getopt.1:1
#, no-wrap
msgid "December 2014"
msgstr "December 2014"
#. type: TH
-#: getopt.man:1
+#: getopt.1:1
#, no-wrap
msgid "util-linux"
msgstr "util-linux"
#. type: TH
-#: getopt.man:1
+#: getopt.1:1
#, no-wrap
msgid "User Commands"
msgstr "User Commands"
#. type: SH
-#: getopt.man:2
+#: getopt.1:2
#, no-wrap
msgid "NAME"
msgstr "名前"
#. type: Plain text
-#: getopt.man:4
+#: getopt.1:4
msgid "getopt - parse command options (enhanced)"
msgstr "getopt - コマンドのオプションを解析する (強化版)"
#. type: SH
-#: getopt.man:4
+#: getopt.1:4
#, no-wrap
msgid "SYNOPSIS"
msgstr "書式"
#. type: Plain text
-#: getopt.man:7
+#: getopt.1:7
msgid "B<getopt> I<optstring parameters>"
msgstr "B<getopt> I<optstring parameters>"
#. type: Plain text
-#: getopt.man:12
+#: getopt.1:12
msgid "B<getopt> [options] [B<-->] I<optstring parameters>"
msgstr "B<getopt> [options] [B<-->] I<optstring parameters>"
#. type: Plain text
-#: getopt.man:20
+#: getopt.1:20
msgid ""
"B<getopt> [options] B<-o>|B<--options> I<optstring> [options] [B<-->] "
"I<parameters>"
"I<parameters>"
#. type: SH
-#: getopt.man:20
+#: getopt.1:20
#, no-wrap
msgid "DESCRIPTION"
msgstr "説明"
#. type: Plain text
-#: getopt.man:29
+#: getopt.1:29
msgid ""
"B<getopt> is used to break up (I<parse>) options in command lines for easy "
-"parsing by shell procedures, and to check for valid options. It uses the "
-"E<.SM GNU> B<getopt>(3) routines to do this."
+"parsing by shell procedures, and to check for valid options. It uses the E<."
+"SM GNU> B<getopt>(3) routines to do this."
msgstr ""
-"B<getopt> ã\82\92使ã\81\88ã\81°ã\80\81ã\82³ã\83\9eã\83³ã\83\89ã\83©ã\82¤ã\83³ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\82\92å\88\86解 (I<æ§\8bæ\96\87解æ\9e\90>) ã\81\97ã\81¦ã\80\81\n"
-"ã\82·ã\82§ã\83«ä¸\8aã\81®å\87¦ç\90\86による解析作業を容易にしたり、\n"
-"ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\9c\89å\8a¹ã\81\8bã\81©ã\81\86ã\81\8bã\82\92ã\83\81ã\82§ã\83\83ã\82¯ã\81\97ã\81\9fã\82\8aã\81\99ã\82\8bã\81\93ã\81¨ã\81\8cã\81§ã\81\8dã\82\8bã\80\82\n"
-"B<getopt> は、そうしたことのために E<.SM GNU> B<getopt>(3)\n"
-"のルーティンを使用している。"
+"B<getopt> ã\81¯ã\80\81ã\82³ã\83\9eã\83³ã\83\89ã\83©ã\82¤ã\83³ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\82\92å\88\86解 (I<æ§\8bæ\96\87解æ\9e\90>)\n"
+"ã\81\97ã\81¦ã\80\81ã\82·ã\82§ã\83«ä¸\8aã\81®æ\89\8bç¶\9aã\81\8dによる解析作業を容易にしたり、\n"
+"ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\9c\89å\8a¹ã\81\8bã\81©ã\81\86ã\81\8bã\82\92ã\83\81ã\82§ã\83\83ã\82¯ã\81\97ã\81\9fã\82\8aã\81\99ã\82\8bã\81\9fã\82\81ã\81«ä½¿ç\94¨ã\81\99ã\82\8bã\80\82B<getopt>\n"
+"は、そうしたことを行うのに E<.SM GNU> B<getopt>(3)\n"
+"のルーティンを使っている。\n"
#. type: Plain text
-#: getopt.man:54
+#: getopt.1:54
msgid ""
"The parameters B<getopt> is called with can be divided into two parts: "
"options which modify the way B<getopt> will do the parsing (the I<options> "
"(上記「B<書式>」の I<parameters>) の 2 つである。2 番目の部分は、\n"
"オプションではない最初のパラメータで、オプションの引き数でもないものから始まるか、\n"
"あるいは、'B<-->' が最初に現れた位置の直後から始まる。なお、1 番目の部分に\n"
-"'B<-o>' オプションや 'B<--options>' オプションが存在しない場合は、2\n"
+"'B<-o>' や 'B<--options>' オプションが存在しない場合は\n"
+"(訳注: そして、他のオプションや B<-->\n"
+"が存在するならば、それは「B<書式>」セクションの第 2 の書式に当たる)、2\n"
"番目の部分の最初のパラメータが、解析の対象となるショートオプションを\n"
-"1 つにまとめたショートオプションズ文字列 (すなわち I<optsting>) として使用される\n"
-"(訳注: これは 2 番目の書式のことである)。\n"
+"1 つにまとめたショートオプションズ文字列 (すなわち I<optsting>) として使用される。\n"
#. type: Plain text
-#: getopt.man:70
+#: getopt.1:70
msgid ""
"If the environment variable B<GETOPT_COMPATIBLE> is set, or if the first "
"I<parameter> is not an option (does not start with a 'B<->', the first "
msgstr ""
"環境変数 B<GETOPT_COMPATIBLE>\n"
"が設定されている場合や、最初のパラメータがオプションではない場合 (すなわち、'B<->'\n"
-"ã\81§å§\8bã\81¾ã\81£ã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\81§ã\80\81ã\81\93ã\82\8cã\81¯ã\80\8cB<æ\9b¸å¼\8f>ã\80\8dã\81®ç¬¬ 1 ã\81®å½¢式である)、この\n"
+"ã\81§å§\8bã\81¾ã\81£ã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\81§ã\80\81ã\81\93ã\82\8cã\81¯ã\80\8cB<æ\9b¸å¼\8f>ã\80\8dã\82»ã\82¯ã\82·ã\83§ã\83³ã\81®ç¬¬ 1 ã\81®æ\9b¸式である)、この\n"
"B<getopt> は他のバージョンの B<getopt>(1) と互換性のある出力を生成する。\n"
-"ã\81ªã\81\8aã\80\81ã\81\9dã\81®å ´å\90\88ã\81§ã\82\82ã\80\81パラメータの並べ替えは行うし、指定が任意の引き数の認識もする\n"
+"ã\81ªã\81\8aã\80\81ã\81\9dã\81®å ´å\90\88ã\81§ã\82\82ã\82\84ã\81¯ã\82\8aパラメータの並べ替えは行うし、指定が任意の引き数の認識もする\n"
"(詳細については、「B<互換性>」セクションを参照していただきたい)。"
#. type: Plain text
-#: getopt.man:89
+#: getopt.1:89
msgid ""
"Traditional implementations of B<getopt>(1) are unable to cope with "
"whitespace and other (shell-specific) special characters in arguments and "
"特殊文字などがあると、それに対処することができなかった。\n"
"この問題を解決するために、この実装では、クォートした出力を生成できるようになっているが、\n"
"そうした出力は、シェルによってもう一度解釈される必要がある\n"
-"(たいていは、そのために B<eval> コマンドを使用する)。\n"
+"(たいていは、そのために B<eval> コマンドを使用する。[訳注: もっと詳しく言うと、\n"
+"B<PARAM=$(getopt -o 'a:b::c' -- \"$@\"); >\n"
+"B<eval set -- \"$PARAM\"> といった方法を用いて、位置パラメータを再構成する])。\n"
"この出力形式を使えば、ホワイトスペースや特殊文字を保護することにはなるが、それには\n"
"B<getopt> を他のバージョンともはや互換性のない形で呼び出さなければならない\n"
"(すなわち、「B<書式>」セクションの第 2 や 第 3 の書式だ)。御使用のシステムに\n"
"専用のテストオプション (B<-T>) を使用すればよい。"
#. type: SH
-#: getopt.man:89
+#: getopt.1:89
#, no-wrap
msgid "OPTIONS"
msgstr "オプション"
#. type: TP
-#: getopt.man:90
+#: getopt.1:90
#, no-wrap
msgid "B<-a>,B< --alternative>"
msgstr "B<-a>,B< --alternative>"
#. type: Plain text
-#: getopt.man:94
+#: getopt.1:94
msgid "Allow long options to start with a single 'B<->'."
msgstr "ロングオプションを 1 個の 'B<->' で始めることができるようにする。"
#. type: TP
-#: getopt.man:94
+#: getopt.1:94
#, no-wrap
msgid "B<-h>,B< --help>"
msgstr "B<-h>,B< --help>"
#. type: Plain text
-#: getopt.man:97
+#: getopt.1:97
msgid "Display help text and exit. No other output is generated."
msgstr "ヘルプを表示して、終了する。それ以上何も出力しない。"
#. type: TP
-#: getopt.man:97
+#: getopt.1:97
#, no-wrap
msgid "B<-l>,B< --longoptions >I<longopts>"
msgstr "B<-l>,B< --longoptions >I<longopts>"
#. type: Plain text
-#: getopt.man:107
+#: getopt.1:107
msgid ""
"The long (multi-character) options to be recognized. More than one option "
"name may be specified at once, by separating the names with commas. This "
"引き数は任意、すなわち、あってもなくてもよいということである。"
#. type: TP
-#: getopt.man:107
+#: getopt.1:107
#, no-wrap
msgid "B<-n>,B< --name >I<progname>"
msgstr "B<-n>,B< --name >I<progname>"
#. type: Plain text
-#: getopt.man:114
+#: getopt.1:114
msgid ""
"The name that will be used by the B<getopt>(3) routines when it reports "
"errors. Note that errors of B<getopt>(1) are still reported as coming from "
"getopt."
msgstr ""
-"B<getopt>(3) ルーティンが、エラーを通知する際に使用するプログラム名を指定する。\n"
+"B<getopt>(3) ルーティンが、エラーを通知する際に使用するプログラム名を指定す"
+"る。\n"
"B<getopt>(1) 自体に関するエラーは (訳注: たとえば、\n"
"B<getopt> コマンドのオプションが間違っている場合などは)、やはり getopt\n"
"コマンドがエラーの発生元として報告されることに注意していただきたい。"
#. type: TP
-#: getopt.man:114
+#: getopt.1:114
#, no-wrap
msgid "B<-o>,B< --options >I<shortopts>"
msgstr "B<-o>,B< --options >I<shortopts>"
#. type: Plain text
-#: getopt.man:134
+#: getopt.1:134
msgid ""
"The short (one-character) options to be recognized. If this option is not "
-"found, the first parameter of B<getopt> that does not start with a 'B<->' "
-"(and is not an option argument) is used as the short options string. Each "
-"short option character in I<shortopts> may be followed by one colon to "
+"found, the first parameter of B<getopt> that does not start with a 'B<-"
+">' (and is not an option argument) is used as the short options string. "
+"Each short option character in I<shortopts> may be followed by one colon to "
"indicate it has a required argument, and by two colons to indicate it has an "
"optional argument. The first character of shortopts may be 'B<+>' or 'B<->' "
"to influence the way options are parsed and output is generated (see section "
"中のショートオプション各文字の後ろには、コロンを続けることができる。コロンが\n"
"1 個のときは、引き数が必須だということであり、2\n"
"個のときは、引き数は任意、すなわち、あってもなくてもよいということである。\n"
-"また、I<shortopts> の最初の文字を 'B<+>' や 'B<->'\n"
-"ã\81«ã\81\99ã\82\8cã\81°ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81®è§£æ\9e\90ã\82\84ã\80\81å\87ºå\8a\9bã\81®ç\94\9fæ\88\90ã\81®ä»\95æ\96¹ã\81«å½±é\9f¿ã\82\92ä¸\8eã\81\88ることができる\n"
+"また、I<shortopts> の先頭に 'B<+>' や 'B<->'\n"
+"ã\81¨ã\81\84ã\81\86æ\96\87å\97ã\82\92ä»\98ã\81\91ã\82\8cã\81°ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81®è§£æ\9e\90ã\81®ä»\95æ\96¹ã\82\84ã\80\81å\87ºå\8a\9bã\81®ç\94\9fæ\88\90ã\81®ä»\95æ\96¹ã\82\92å¤\89æ\9b´ã\81\99ることができる\n"
"(詳細については、「B<スキャニングモード>」セクションを参照すること)。"
#. type: TP
-#: getopt.man:134
+#: getopt.1:134
#, no-wrap
msgid "B<-q>,B< --quiet>"
msgstr "B<-q>,B< --quiet>"
#. type: Plain text
-#: getopt.man:137
+#: getopt.1:137
msgid "Disable error reporting by getopt(3)."
msgstr "getopt(3) の出すエラーメッセージを表示しない。"
#. type: TP
-#: getopt.man:137
+#: getopt.1:137
#, no-wrap
msgid "B<-Q>,B< --quiet-output>"
msgstr "B<-Q>,B< --quiet-output>"
#. type: Plain text
-#: getopt.man:143
+#: getopt.1:143
msgid ""
"Do not generate normal output. Errors are still reported by B<getopt>(3), "
"unless you also use B<-q>."
"B<getopt>(3) によるエラー報告は行われる。"
#. type: TP
-#: getopt.man:143
+#: getopt.1:143
#, no-wrap
msgid "B<-s>,B< --shell >I<shell>"
msgstr "B<-s>,B< --shell >I<shell>"
#. type: Plain text
-#: getopt.man:155
+#: getopt.1:155
msgid ""
"Set quoting conventions to those of I<shell>. If the B<-s> option is not "
"given, the E<.SM BASH> conventions are used. Valid arguments are currently "
"'B<sh>' 'B<bash>', 'B<csh>', and 'B<tcsh>'."
msgstr ""
-"クォート方式を I<shell> のものにする。B<-s> "
-"オプションが指定されていない場合は、 E<.SM BASH> "
-"のクォート方式が使われる。 "
-"指定可能な引き数は、現在のところ 'B<sh>', 'B<bash>', "
-"'B<csh>', 'B<tcsh>' である。"
+"クォート方式を I<shell> のものにする。B<-s> オプションが指定されていない場合"
+"は、 E<.SM BASH> のクォート方式が使われる。 指定可能な引き数は、現在のところ "
+"'B<sh>', 'B<bash>', 'B<csh>', 'B<tcsh>' である。"
#. type: TP
-#: getopt.man:155
+#: getopt.1:155
#, no-wrap
msgid "B<-T>,B< --test>"
msgstr "B<-T>,B< --test>"
#. type: Plain text
-#: getopt.man:167
+#: getopt.1:167
msgid ""
"Test if your B<getopt>(1) is this enhanced version or an old version. This "
"generates no output, and sets the error status to 4. Other implementations "
"of B<getopt>(1), and this version if the environment variable "
"B<GETOPT_COMPATIBLE> is set, will return 'B<-->' and error status 0."
msgstr ""
-"現在使っている B<getopt>(1) "
-"が、強化バージョンか古いバージョンかをテストする。 "
-"このオプションは何も出力しないが、エラーステータスを "
-"4 にする。 B<getopt(1)> "
-"の他の実装や、このバージョンでも環境変数 "
-"B<GETOPT_COMPATIBLE> が設定されている場合は、 'B<-->' "
-"を返して、エラーステータスを 0 にする。"
+"現在使っている B<getopt>(1) が、強化バージョンか古いバージョンかをテストす"
+"る。 このオプションは何も出力しないが、エラーステータスを 4 にする。 "
+"B<getopt(1)> の他の実装や、このバージョンでも環境変数 B<GETOPT_COMPATIBLE> が"
+"設定されている場合は、 'B<-->' を返して、エラーステータスを 0 にする。"
#. type: TP
-#: getopt.man:167
+#: getopt.1:167
#, no-wrap
msgid "B<-u>,B< --unquoted>"
msgstr "B<-u>,B< --unquoted>"
#. type: Plain text
-#: getopt.man:174
+#: getopt.1:174
msgid ""
"Do not quote the output. Note that whitespace and special (shell-dependent) "
"characters can cause havoc in this mode (like they do with other "
"B<getopt>(1) implementations)."
msgstr ""
-"出力をクォートしない。このモードでは、ホワイトスペースや "
-"(シェルによって様々な) 特殊文字が、 (B<getopt>(1) "
-"の他の実装におけると同様に) "
-"望ましからぬ混乱を引き起こしかねないことに、注意していただきたい。"
+"出力をクォートしない。このモードでは、ホワイトスペースや (シェルによって様々"
+"な) 特殊文字が、 (B<getopt>(1) の他の実装におけると同様に) 望ましからぬ混乱"
+"を引き起こしかねないことに、注意していただきたい。"
#. type: TP
-#: getopt.man:174
+#: getopt.1:174
#, no-wrap
msgid "B<-V>,B< --version>"
msgstr "B<-V>,B< --version>"
#. type: Plain text
-#: getopt.man:177
+#: getopt.1:177
msgid "Display version information and exit. No other output is generated."
msgstr "バージョン情報を表示して、終了する。それ以上何も出力しない。"
#. type: SH
-#: getopt.man:177
+#: getopt.1:177
#, no-wrap
msgid "PARSING"
msgstr "構文解析"
#. type: Plain text
-#: getopt.man:197
+#: getopt.1:197
msgid ""
"This section specifies the format of the second part of the parameters of "
"B<getopt> (the I<parameters> in the B<SYNOPSIS>). The next section "
"では、生成される出力について説明する。一般に B<getopt>\n"
"は、シェル関数やシェルスクリプトの中で、その引き数を解析するために使うものなので、\n"
"ここで取り上げるパラメータ群が、元はと言えば、\n"
-"シェル関数を呼んだときに渡したパラメータだったというのは、\n"
-"ごく普通のことである。そこで、シェル関数を呼んだときに渡す各パラメータは、B<getopt>\n"
-"に渡されるパラメータリスト中のパラメータと 1 対 1\n"
-"で対応するように、気を付けて指定しなければならないのだ\n"
-"(「B<用例>」セクションを参照)。すべての解析は、GNU B<getopt>(3)\n"
-"のルーティンによって行われる。"
+"シェル関数を呼んだときに渡したパラメータだったというのは、ごく普通のことである。\n"
+"そこで、気を付けなければならないことがある。シェル関数を呼んだときに渡す各パラメータは、\n"
+"B<getopt> に渡されるパラメータリスト中のパラメータと\n"
+"1 対 1 で対応していなければならないのだ (「B<用例>」セクションを参照)。\n"
+"すべての解析は、GNU B<getopt>(3) のルーティンによって行われる。\n"
#. type: Plain text
-#: getopt.man:201
+#: getopt.1:201
msgid ""
"The parameters are parsed from left to right. Each parameter is classified "
"as a short option, a long option, an argument to an option, or a non-option "
"parameter."
-msgstr "パラメータ群は左から右へ解析される。各パラメータは、ショートオプション、ロングオプション、 オプションの引き数、オプションとは無関係なパラメータに分割分類される。"
+msgstr ""
+"パラメータ群は左から右へ解析される。各パラメータは、ショートオプション、ロン"
+"グオプション、 オプションの引き数、オプションとは無関係なパラメータに分割分類"
+"される。"
#. type: Plain text
-#: getopt.man:209
+#: getopt.1:209
msgid ""
"A simple short option is a 'B<->' followed by a short option character. If "
"the option has a required argument, it may be written directly after the "
msgstr ""
"単純なショートオプションは、1 個の 'B<->' に 1\n"
"個のショートオプション文字が続くものである。\n"
-"オプションが引き数を必須にしている場合は、オプション文字の直後に続けてもよく、\n"
-"次のパラメータとして (すなわち、コマンドライン上でホワイトスペースを間に置いて)\n"
+"オプションが引き数を必須にしている場合は、オプション文字の直後に続けてもよ"
+"く、\n"
+"次のパラメータとして (すなわち、コマンドライン上でホワイトスペースを間に置い"
+"て)\n"
"書いてもよい。オプションの引き数が任意の場合は、それが存在するなら、\n"
"オプション文字の直後に続けなければならない。"
#. type: Plain text
-#: getopt.man:214
+#: getopt.1:214
msgid ""
"It is possible to specify several short options after one 'B<->', as long as "
"all (except possibly the last) do not have required or optional arguments."
msgstr ""
-"1 個の 'B<->' の後ろに数個のショートオプションをまとめて指定することもできる。\n"
+"1 個の 'B<->' の後ろに数個のショートオプションをまとめて指定することもでき"
+"る。\n"
"ただし、最後のオプション以外のすべてのオプションが、\n"
"必須や任意の引き数を取らないという条件がある\n"
"(例外として、最後のオプションは引き数を取ることができる)。"
#. type: Plain text
-#: getopt.man:232
+#: getopt.1:232
msgid ""
"A long option normally begins with 'B<-->' followed by the long option "
"name. If the option has a required argument, it may be written directly "
-"after the long option name, separated by 'B<=>', or as the next argument "
-"(i.e., separated by whitespace on the command line). If the option has an "
+"after the long option name, separated by 'B<=>', or as the next argument (i."
+"e., separated by whitespace on the command line). If the option has an "
"optional argument, it must be written directly after the long option name, "
"separated by 'B<=>', if present (if you add the 'B<=>' but nothing behind "
"it, it is interpreted as if no argument was present; this is a slight bug, "
"オプションが引き数を必須にしている場合は、ロングオプション名の直後に 'B<=>'\n"
"で区切って続けてもよく、次の引き数として\n"
"(すなわち、コマンドライン上でホワイトスペースを間に置いて) 書いてもよい。\n"
-"オプションの引き数が任意の場合は、それが存在するなら、ロングオプション名の直後に\n"
+"オプションの引き数が任意の場合は、それが存在するなら、ロングオプション名の直"
+"後に\n"
"\\&'B<=>' で区切って続けなければならない ('B<=>'\n"
-"を続けたものの、その後に何も指定しない場合は、引き数が存在しないかのように解釈される。\n"
+"を続けたものの、その後に何も指定しない場合は、引き数が存在しないかのように解"
+"釈される。\n"
"これはちょっとしたバグである。「B<バグ>」セクションを参照)。\n"
"ロングオプションは、短縮しても他のオプションと区別が付くかぎり、短縮できる。"
#. type: Plain text
-#: getopt.man:245
+#: getopt.1:245
msgid ""
"Each parameter not starting with a 'B<->', and not a required argument of a "
"previous option, is a non-option parameter. Each parameter after a 'B<-->' "
"string started with a 'B<+>', all remaining parameters are interpreted as "
"non-option parameters as soon as the first non-option parameter is found."
msgstr ""
-"'B<->' で始まっていないパラメータで、直前のオプションの必須の引き数でもないものは、\n"
+"'B<->' で始まっていないパラメータで、直前のオプションの必須の引き数でもないも"
+"のは、\n"
"いずれもオプションとは無関係なパラメータである。また、'B<-->'\n"
-"というパラメータの後にあるパラメータは、常にオプションとは無関係なパラメータと解釈される。\n"
-"環境変数 B<POSIXLY_CORRECT> が設定されている場合や、ショートオプションズ文字列\n"
+"というパラメータの後にあるパラメータは、常にオプションとは無関係なパラメータ"
+"と解釈される。\n"
+"環境変数 B<POSIXLY_CORRECT> が設定されている場合や、ショートオプションズ文字"
+"列\n"
"(訳注: 「B<書式>」の I<optstring>) が 'B<+>'\n"
-"で始まっている場合は、オプションとは無関係な最初のパラメータが見つかった時点で、\n"
+"で始まっている場合は、オプションとは無関係な最初のパラメータが見つかった時点"
+"で、\n"
"残りのすべてのパラメータは、オプションとは無関係なパラメータと解釈される。"
#. type: SH
-#: getopt.man:245
+#: getopt.1:245
#, no-wrap
msgid "OUTPUT"
msgstr "出力"
#. type: Plain text
-#: getopt.man:260
+#: getopt.1:260
msgid ""
"Output is generated for each element described in the previous section. "
"Output is done in the same order as the elements are specified in the input, "
"モードで行うこともできるし、ホワイトスペースなどの特殊文字が、\n"
"オプション引き数やオプションとは無関係なパラメータ中にある場合に、\n"
"そうしたものを保護する形で行うこともできる (「B<クォート>」セクションを参照)。\n"
-"出力はシェルスクリプト中で処理される際に、それを構成する各要素が、\n"
-"それぞれ別の独立したものに見えることになるので、(ほとんどのシェル言語では、shift\n"
-"コマンドを使って) ひとつひとつ処理することが可能になる。\n"
+"出力はシェルスクリプト中で処理される際に、出力を構成する各要素が、\n"
+"それぞれ他と区別されるものとして見えることになるので、(ほとんどのシェル言語で\n"
+"shift コマンドを使って) ひとつひとつ処理することが可能になる。\n"
"ただし、クォートなしのモードでのこの処理は、完全ではない。\n"
"要素にホワイトスペースや特殊文字が含まれていると、\n"
-"æ\80\9dã\81\84ã\81\8cã\81\91ã\81ªã\81\84ã\81¨ã\81\93ã\82\8dã\81§è¦\81ç´ ã\81\8cå\88\86å\89²ã\81\95ã\82\8cã\81¦ã\81\97ã\81¾ã\81\86ã\81\8bã\82\82ã\81\97ã\82\8cã\81ªã\81\84ã\81\8bã\82\89ã\81§ã\81\82ã\82\8bã\80\82"
+"æ\80\9dã\81\84ã\81\8cã\81\91ã\81ªã\81\84ã\81¨ã\81\93ã\82\8dã\81§è¦\81ç´ ã\81\8cå\88\86å\89²ã\81\95ã\82\8cã\81¦ã\81\97ã\81¾ã\81\86ã\81\8bã\82\82ã\81\97ã\82\8cã\81ªã\81\84ã\81®ã\81§ã\81\82ã\82\8bã\80\82\n"
#. type: Plain text
-#: getopt.man:265
+#: getopt.1:265
msgid ""
"If there are problems parsing the parameters, for example because a required "
"argument is not found or an option is not recognized, an error will be "
"たとえば、引き数が必須なのに存在しないとか、未知のオプションがあるとかいう理由で、\n"
"パラメータの解析中に問題が起きたときは、エラーメッセージが標準エラーに表示され、\n"
"問題を起こした要素については、何も出力されない。\n"
-"そして、ゼロ以外のエラーステータスが返される。"
+"そして、ゼロ以外のエラーステータスが返される。\n"
#. type: Plain text
-#: getopt.man:276
+#: getopt.1:276
msgid ""
"For a short option, a single 'B<->' and the option character are generated "
"as one parameter. If the option has an argument, the next parameter will be "
msgstr ""
"ショートオプションに対しては、1 個の 'B<->'\n"
"とオプション文字が、ひとつのパラメータとして生成される。\n"
-"ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81«å¼\95ã\81\8dæ\95°ã\81\8cã\81\82ã\82\8bå ´å\90\88ã\81¯ã\80\81次ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81\8cその引き数である。\n"
+"ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81«å¼\95ã\81\8dæ\95°ã\81\8cã\81\82ã\82\8bå ´å\90\88ã\81¯ã\80\81次ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81¯その引き数である。\n"
"オプションの引き数が任意なとき、その引き数が見つからなかった場合は、\n"
"クォーティングモードでは、次のパラメータが生成されるが、空のパラメータになる。\n"
"クォートなしのモード (互換モード) では、2 番目のパラメータは生成されない。\n"
-"なお、B<getopt>(1) の他の実装では、任意の引数をサポートしていないことが多い。"
+"なお、B<getopt>(1) の他の実装では、任意の引数をサポートしていないことが多い。\n"
#. type: Plain text
-#: getopt.man:280
+#: getopt.1:280
msgid ""
"If several short options were specified after a single 'B<->', each will be "
"present in the output as a separate parameter."
msgstr ""
"1 個の 'B<->' の後ろに複数のショートオプションが指定されている場合は、\n"
-"各オプションがそれぞれ独立したパラメータとして出力されることになる。"
+"各オプションがそれぞれ独立したパラメータとして出力されることになる。\n"
#. type: Plain text
-#: getopt.man:288
+#: getopt.1:288
msgid ""
"For a long option, 'B<-->' and the full option name are generated as one "
"parameter. This is done regardless whether the option was abbreviated or "
"と省略なしのオプション名がひとつのパラメータとして生成される。\n"
"この動作は、入力中でオプションが短縮されているかどうかや、1 個の 'B<->'\n"
"とともに指定されているかどうか (訳注: B<-a> オプションを使った場合)\n"
-"とは、関係がない。引き数の処理は、ショートオプションの場合と同じである。"
+"とは、関係がない。引き数の処理は、ショートオプションの場合と同じである。\n"
#. type: Plain text
-#: getopt.man:305
+#: getopt.1:305
msgid ""
"Normally, no non-option parameters output is generated until all options and "
"their arguments have been generated. Then 'B<-->' is generated as a single "
"その後で、オプションとは無関係なパラメータが、\n"
"見つかった順序で、それぞれ独立したパラメータとして生成される。\n"
"ただし、ショートオプションズ文字列の最初の文字が 'B<->'\n"
-"ã\81®ã\81¨ã\81\8dã\81 ã\81\91ã\81¯å\88¥ã\81§ã\80\81ã\81\9dã\81®å ´å\90\88ã\81¯ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81¨ã\81¯ç\84¡é\96¢ä¿\82ã\81ªã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81®å\87ºå\8a\9bã\81\8c、\n"
+"ã\81®ã\81¨ã\81\8dã\81 ã\81\91ã\81¯å\88¥ã\81§ã\80\81ã\81\9dã\81®å ´å\90\88ã\81¯ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81¨ã\81¯ç\84¡é\96¢ä¿\82ã\81ªã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81®å\87ºå\8a\9bã\81¯、\n"
"入力中のそれが見つかった位置で生成される (この動作は、「B<書式>」セクションの第 1\n"
"の書式が使用されている場合には、サポートされない。\n"
"その場合は、ショートオプションズ文字列の前にある 'B<->' や\n"
-"'B<+>' は、すべて無視される)。"
+"'B<+>' は、すべて無視される)。\n"
#. type: SH
-#: getopt.man:305
+#: getopt.1:305
#, no-wrap
msgid "QUOTING"
msgstr "クォート"
#. type: Plain text
-#: getopt.man:315
+#: getopt.1:315
msgid ""
-"In compatible mode, whitespace or 'special' characters in arguments or "
-"non-option parameters are not handled correctly. As the output is fed to "
-"the shell script, the script does not know how it is supposed to break the "
+"In compatible mode, whitespace or 'special' characters in arguments or non-"
+"option parameters are not handled correctly. As the output is fed to the "
+"shell script, the script does not know how it is supposed to break the "
"output into separate parameters. To circumvent this problem, this "
"implementation offers quoting. The idea is that output is generated with "
"quotes around each parameter. When this output is once again fed to the "
"互換モードでは、オプションの引き数やオプションとは無関係なパラメータ中に、\n"
"ホワイトスペースや特殊文字があると、それを適切に処理できない。\n"
"そのため、互換モードの出力を渡されたシェルスクリプトは、\n"
-"ã\81\9dã\81®å\87ºå\8a\9bã\82\92ã\81©ã\81®ã\82\88ã\81\86ã\81«å\80\8bã\80\85ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81«å\88\86å\89²ã\81\99ã\82\8cã\81°ã\82\88ã\81\84のか、わからないことになる。\n"
+"ã\81\9dã\81®å\87ºå\8a\9bã\82\92ã\81©ã\81®ã\82\88ã\81\86ã\81«å\80\8bã\80\85ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81«å\88\86å\89²ã\81\99ã\82\8bã\81\93ã\81¨ã\81\8cæ\9c\9få¾\85ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bのか、わからないことになる。\n"
"この問題を回避するために、B<getopt> のこの実装では、クォートによる保護を提供している。\n"
"要するに、出力を生成するとき、パラメータをひとつひとつ引用符で囲んでやるのである。この出力を\n"
"(たいていは、シェルの B<eval> コマンドを使って)\n"
-"もう一度シェルに渡してやれば、別々のパラメータに適切に分割されることになる。"
+"もう一度シェルに渡してやれば、別々のパラメータに適切に分割されることになる。\n"
#. type: Plain text
-#: getopt.man:323
+#: getopt.1:323
msgid ""
"Quoting is not enabled if the environment variable B<GETOPT_COMPATIBLE> is "
"set, if the first form of the B<SYNOPSIS> is used, or if the option 'B<-u>' "
msgstr ""
"次の場合には、引用符による保護が行われない。環境変数 B<GETOPT_COMPATIBLE>\n"
"が設定されている場合、「B<書式>」セクションの第 1\n"
-"の書式が使われている場合、'B<-u>' オプションが指定されている場合。"
+"の書式が使われている場合、'B<-u>' オプションが指定されている場合。\n"
#. type: Plain text
-#: getopt.man:337
+#: getopt.1:337
msgid ""
"Different shells use different quoting conventions. You can use the 'B<-s>' "
"option to select the shell you are using. The following shells are "
"currently supported: 'B<sh>', 'B<bash>', 'B<csh>' and 'B<tcsh>'. Actually, "
-"only two 'flavors' are distinguished: sh-like quoting conventions and "
-"csh-like quoting conventions. Chances are that if you use another shell "
-"script language, one of these flavors can still be used."
+"only two 'flavors' are distinguished: sh-like quoting conventions and csh-"
+"like quoting conventions. Chances are that if you use another shell script "
+"language, one of these flavors can still be used."
msgstr ""
"クォート方式はシェルごとに異なる。自分が使用しているシェルの方式を選ぶには、'B<-s>'\n"
"オプションを使えばよい。現在サポートしているシェルは、'B<sh>', 'B<bash>',\n"
"'B<csh>', 'B<tcsh>' である。実のところ、sh 風のクォート方式と\n"
"csh 風のクォート方式という、2 つの系統しか区別していない。\n"
"別のシェルスクリプト言語を使用している場合でも、この\n"
-"2 つの系統のどちらかが多分使えるだろう。"
+"2 つの系統のどちらかが多分使えるだろう。\n"
#. type: SH
-#: getopt.man:337
+#: getopt.1:337
#, no-wrap
msgid "SCANNING MODES"
msgstr "スキャニングモード"
#. type: Plain text
-#: getopt.man:348
+#: getopt.1:348
msgid ""
"The first character of the short options string may be a 'B<->' or a 'B<+>' "
"to indicate a special scanning mode. If the first calling form in the "
"B<SYNOPSIS> is used they are ignored; the environment variable "
"B<POSIXLY_CORRECT> is still examined, though."
msgstr ""
-"ショートオプションズ文字列 (訳注: 「書式」の I<optstring>)\n"
+"ショートオプションズ文字列 (訳注: 「B<書式>」の I<optstring>)\n"
"の先頭には、1 個の 'B<->' または 'B<+>'\n"
"を付けて、特別なスキャニングモードを指示することができる。\n"
-"「B<書式>」の第 1 の呼び出し形式が使用されている場合には、\n"
+"ã\80\8cB<æ\9b¸å¼\8f>ã\80\8dã\82»ã\82¯ã\82·ã\83§ã\83³ã\81®ç¬¬ 1 ã\81®å\91¼ã\81³å\87ºã\81\97å½¢å¼\8fã\81\8c使ç\94¨ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bå ´å\90\88ã\81«ã\81¯ã\80\81\n"
"こうしたプラスやマイナス記号は無視されるが、そのときでも、環境変数\n"
"B<POSIXLY_CORRECT> が設定されているかどうかは、やはり調べられる (訳注: 実際には、\n"
"第 1 の書式で I<optstring> の先頭に 'B<->'\n"
"を付けると、2, 3 番目の書式と混同されて、多分エラーになる)。"
#. type: Plain text
-#: getopt.man:358
+#: getopt.1:358
msgid ""
"If the first character is 'B<+>', or if the environment variable "
"B<POSIXLY_CORRECT> is set, parsing stops as soon as the first non-option "
msgstr ""
"先頭文字が 'B<+>' の場合や、環境変数 B<POSIXLY_CORRECT>\n"
"が設定されている場合は、オプションではないパラメータで (すなわち、'B<-'>\n"
-"で始まっていないパラメータで)、かつオプションの引き数でもないものが最初に見つかった時点で、\n"
-"解析はストップする。残りのパラメータはすべて、オプションとは無関係なパラメータと見なされる。"
+"で始まっていないパラメータで)、かつオプションの引き数でもないものが最初に見つ"
+"かった時点で、\n"
+"解析はストップする。残りのパラメータはすべて、オプションとは無関係なパラメー"
+"タと見なされる。"
#. type: Plain text
-#: getopt.man:369
+#: getopt.1:369
msgid ""
"If the first character is a 'B<->', non-option parameters are outputted at "
"the place where they are found; in normal operation, they are all collected "
"というパラメータはやはり生成されるが、必ず最後のパラメータになる。"
#. type: SH
-#: getopt.man:369
+#: getopt.1:369
#, no-wrap
msgid "COMPATIBILITY"
msgstr "互換性"
#. type: Plain text
-#: getopt.man:375
+#: getopt.1:375
msgid ""
"This version of B<getopt>(1) is written to be as compatible as possible to "
"other versions. Usually you can just replace them with this version without "
msgstr ""
"このバージョンの B<getopt>(1)\n"
"は、できるだけ他のバージョンと互換性があるように書かれている。\n"
-"たいていの場合、他のバージョンの B<getopt> をこのバージョンで置き換えるだけでよく、\n"
-"既存のシェルスクリプトなどに手を入れる必要はない。さらに、いくつかの利点もある。"
+"たいていの場合、他のバージョンの B<getopt> をこのバージョンで置き換えるだけで"
+"よく、\n"
+"既存のシェルスクリプトなどに手を入れる必要はない。さらに、いくつかの利点もあ"
+"る。"
#. type: Plain text
-#: getopt.man:386
+#: getopt.1:386
msgid ""
"If the first character of the first parameter of getopt is not a 'B<->', "
"B<getopt> goes into compatibility mode. It will interpret its first "
"parameters are output at the end), unless the environment variable "
"B<POSIXLY_CORRECT> is set."
msgstr ""
-"getopt の最初のパラメータの最初の文字が 'B<->' "
-"でない場合、getopt は互換モードになる。 "
-"最初のパラメータは、ショートオプションをひとつにまとめた文字列と見なされ、 "
-"他のすべての引き数は、解析の対象になる。 "
-"この場合でも、環境変数 B<POSIXLY_CORRECT> "
-"が設定されていないかぎり、パラメータの並べ替えは行う。 "
-"(すなわち、オプションとは無関係なすべてのパラメータは、最後に出力される)。"
+"getopt の最初のパラメータの最初の文字が 'B<->' でない場合、getopt は互換モー"
+"ドになる。 最初のパラメータは、ショートオプションをひとつにまとめた文字列と見"
+"なされ、 他のすべての引き数は、解析の対象になる。 この場合でも、環境変数 "
+"B<POSIXLY_CORRECT> が設定されていないかぎり、パラメータの並べ替えは行う。 (す"
+"なわち、オプションとは無関係なすべてのパラメータは、最後に出力される)。"
#. type: Plain text
-#: getopt.man:395
+#: getopt.1:395
msgid ""
"The environment variable B<GETOPT_COMPATIBLE> forces B<getopt> into "
"compatibility mode. Setting both this environment variable and "
msgstr ""
"環境変数 B<GETOPT_COMPATIBLE> は B<getopt>\n"
"を強制的に互換モードにする。この環境変数と B<POSIXLY_CORRECT>\n"
-"の両方を設定すると、「気難しい」プログラムのために 100% の互換性が得られる。\n"
+"の両方を設定すると、「気難しい」プログラムのために 100% の互換性が得られ"
+"る。\n"
"しかし、通常はどちらも設定する必要がない。"
#. type: Plain text
-#: getopt.man:401
+#: getopt.1:401
msgid ""
"In compatibility mode, leading 'B<->' and 'B<+>' characters in the short "
"options string are ignored."
msgstr ""
-"互換モードでは、ショートオプションズ文字列の先頭に付く "
-"'B<->' や 'B<+>' は無視される。"
+"互換モードでは、ショートオプションズ文字列の先頭に付く 'B<->' や 'B<+>' は無"
+"視される。"
#. type: SH
-#: getopt.man:401
+#: getopt.1:401
#, no-wrap
msgid "RETURN CODES"
msgstr "返り値"
#. type: Plain text
-#: getopt.man:417
+#: getopt.1:417
msgid ""
"B<getopt> returns error code B<0> for successful parsing, B<1> if "
"B<getopt>(3) returns errors, B<2> if it does not understand its own "
"B<getopt> は、解析に成功した場合は、エラーコード B<0> を返す。 B<getopt>(3)\n"
"がエラーを返した場合は B<1> を返す。\n"
"自分自身に対して与えられたパラメータが理解できなかった場合は B<2>\n"
-"を返す。メモリが足りない (out-of-memory) といった内部エラーが起きた場合は B<3>\n"
+"を返す。メモリが足りない (out-of-memory) といった内部エラーが起きた場合は "
+"B<3>\n"
"を返す。B<-T> オプションを付けて呼び出された場合は B<4> を返す。"
#. type: SH
-#: getopt.man:417
+#: getopt.1:417
#, no-wrap
msgid "EXAMPLES"
msgstr "用例"
#. type: Plain text
-#: getopt.man:425
+#: getopt.1:423
msgid ""
"Example scripts for (ba)sh and (t)csh are provided with the B<getopt>(1) "
-"distribution, and are optionally installed in I</usr/share/getopt/> or "
-"I</usr/share/doc/> in the util-linux subdirectory."
+"distribution, and are installed in I</usr/share/doc/util-linux/getopt/> "
+"directory."
msgstr ""
"B<getopt>(1) の配布では、(ba)sh と (t)csh\n"
-"用のスクリプトの見本を提供している。インストールされているなら、I</usr/share/getopt/>\n"
-"か I</usr/share/doc/> 以下の util-linux のサブディレクトリにあるだろう。"
+"用のスクリプトの見本を提供している。インストール場所は\n"
+"I</usr/share/doc/util-linux/getopt/> である\n"
+"(訳注: I</usr/share/doc/util-linux/examples/> などかもしれない)。\n"
#. type: SH
-#: getopt.man:425
+#: getopt.1:423
#, no-wrap
msgid "ENVIRONMENT"
msgstr "環境変数"
#. type: IP
-#: getopt.man:426
+#: getopt.1:424
#, no-wrap
msgid "POSIXLY_CORRECT"
msgstr "POSIXLY_CORRECT"
#. type: Plain text
-#: getopt.man:434
+#: getopt.1:432
msgid ""
"This environment variable is examined by the B<getopt>(3) routines. If it "
"is set, parsing stops as soon as a parameter is found that is not an option "
-"or an option argument. All remaining parameters are also interpreted as "
-"non-option parameters, regardless whether they start with a 'B<->'."
+"or an option argument. All remaining parameters are also interpreted as non-"
+"option parameters, regardless whether they start with a 'B<->'."
msgstr ""
-"この環境変数は B<getopt>(3) ルーティンによって調べられる。これが設定されている場合、\n"
-"オプションでもオプションの引き数でもないパラメータが見つかった時点で、解析は停止する。\n"
+"この環境変数は B<getopt>(3) ルーティンによって調べられる。これが設定されてい"
+"る場合、\n"
+"オプションでもオプションの引き数でもないパラメータが見つかった時点で、解析は"
+"停止する。\n"
"それ以降のすべてのパラメータは、'B<->'\n"
-"で始まっているかどうかに関係なく、オプションとは無関係なパラメータとして解釈される。"
+"で始まっているかどうかに関係なく、オプションとは無関係なパラメータとして解釈"
+"される。"
#. type: IP
-#: getopt.man:434
+#: getopt.1:432
#, no-wrap
msgid "GETOPT_COMPATIBLE"
msgstr "GETOPT_COMPATIBLE"
#. type: Plain text
-#: getopt.man:439
+#: getopt.1:437
msgid ""
"Forces B<getopt> to use the first calling format as specified in the "
"B<SYNOPSIS>."
"の呼び出し形式を使わせる。"
#. type: SH
-#: getopt.man:439
+#: getopt.1:437
#, no-wrap
msgid "BUGS"
msgstr "バグ"
#. type: Plain text
-#: getopt.man:446
+#: getopt.1:444
msgid ""
"B<getopt>(3) can parse long options with optional arguments that are given "
"an empty optional argument (but cannot do this for short options). This "
"present."
msgstr ""
"B<getopt>(3)\n"
-"関数は、引き数が任意のロングオプションが、空の任意引き数を渡された場合でも、解析できる\n"
-"(だが、ショートオプションについては、それができない)。この B<getopt>(1)\n"
+"関数は、引き数が任意のロングオプションが空の任意引き数を渡された場合、それを解析できる\n"
+"(だが、ショートオプションに対しては、それができない)。一方、この B<getopt>(1)\n"
"コマンドは、空の任意引き数を、引き数が存在しないかのように処理している。\n"
#. type: Plain text
-#: getopt.man:450
+#: getopt.1:448
msgid ""
"The syntax if you do not want any short option variables at all is not very "
"intuitive (you have to set them explicitly to the empty string)."
msgstr ""
"ショートオプションを全く使いたくない場合の B<getopt>\n"
"コマンドの構文は、あまり直感的ではない\n"
-"(ショートオプションズ文字列を明示的に空文字列にしなければならないのだ)。"
+"(ショートオプションズ文字列を明示的に空文字列にしなければならないのだ)。\n"
#. type: SH
-#: getopt.man:450
+#: getopt.1:448
#, no-wrap
msgid "AUTHOR"
msgstr "作者"
#. type: Plain text
-#: getopt.man:453
+#: getopt.1:451
msgid "Frodo Looijaard"
msgstr "Frodo Looijaard"
#. type: SH
-#: getopt.man:454
+#: getopt.1:452
#, no-wrap
msgid "SEE ALSO"
msgstr "関連項目"
#. type: Plain text
-#: getopt.man:458
+#: getopt.1:456
msgid "B<bash>(1), B<tcsh>(1), B<getopt>(3)"
msgstr "B<bash>(1), B<tcsh>(1), B<getopt>(3)"
#. type: SH
-#: getopt.man:458
+#: getopt.1:456
#, no-wrap
msgid "AVAILABILITY"
msgstr "入手方法"
#. type: Plain text
-#: getopt.man:462
+#: getopt.1:460
msgid ""
"The getopt command is part of the util-linux package and is available from "
"E<.UR https://\\:www.kernel.org\\:/pub\\:/linux\\:/utils\\:/util-linux/> "
.\" Updated & Modified (util-linux 2.34) Fri Sep 25 10:16:02 JST 2020
.\" by Yuichi SATO <ysato444@ybb.ne.jp>
.\" and Yoichi Chonan <cyoichi@maple.ocn.ne.jp>
+.\" Updated & Modified (util-linux 2.36) Sun Mar 7 09:36:18 JST 2021
+.\" by Yoichi Chonan <cyoichi@maple.ocn.ne.jp>
.\"
.TH GETOPT 1 "December 2014" util\-linux "User Commands"
.SH 名前
\fBgetopt\fP [options] \fB\-o\fP|\fB\-\-options\fP \fIoptstring\fP [options] [\fB\-\-\fP]
\fIparameters\fP
.SH 説明
-\fBgetopt\fP ã\82\92使ã\81\88ã\81°ã\80\81ã\82³ã\83\9eã\83³ã\83\89ã\83©ã\82¤ã\83³ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\82\92å\88\86解 (\fIæ§\8bæ\96\87解æ\9e\90\fP) ã\81\97ã\81¦ã\80\81
-ã\82·ã\82§ã\83«ä¸\8aã\81®å\87¦ç\90\86による解析作業を容易にしたり、
-ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\9c\89å\8a¹ã\81\8bã\81©ã\81\86ã\81\8bã\82\92ã\83\81ã\82§ã\83\83ã\82¯ã\81\97ã\81\9fã\82\8aã\81\99ã\82\8bã\81\93ã\81¨ã\81\8cã\81§ã\81\8dã\82\8bã\80\82
-\fBgetopt\fP は、そうしたことのために
+\fBgetopt\fP ã\81¯ã\80\81ã\82³ã\83\9eã\83³ã\83\89ã\83©ã\82¤ã\83³ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\82\92å\88\86解 (\fIæ§\8bæ\96\87解æ\9e\90\fP)
+ã\81\97ã\81¦ã\80\81ã\82·ã\82§ã\83«ä¸\8aã\81®æ\89\8bç¶\9aã\81\8dによる解析作業を容易にしたり、
+ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\9c\89å\8a¹ã\81\8bã\81©ã\81\86ã\81\8bã\82\92ã\83\81ã\82§ã\83\83ã\82¯ã\81\97ã\81\9fã\82\8aã\81\99ã\82\8bã\81\9fã\82\81ã\81«ä½¿ç\94¨ã\81\99ã\82\8bã\80\82\fBgetopt\fP
+は、そうしたことを行うのに
.SM GNU
\fBgetopt\fP(3)
-のルーティンを使用している。
+のルーティンを使っている。
.PP
\fBgetopt\fP を呼び出すときに使用するパラメータは、2 つの部分に分けることができる。
すなわち、\fBgetopt\fP が解析を行うときの動作を変更するオプション部分
(上記「\fB書式\fP」の \fIparameters\fP) の 2 つである。2 番目の部分は、
オプションではない最初のパラメータで、オプションの引き数でもないものから始まるか、
あるいは、'\fB\-\-\fP' が最初に現れた位置の直後から始まる。なお、1 番目の部分に
-\&'\fB\-o\fP' オプションや '\fB\-\-options\fP' オプションが存在しない場合は、2
+\&'\fB\-o\fP' や '\fB\-\-options\fP' オプションが存在しない場合は
+(訳注: そして、他のオプションや \fB\-\-\fP
+が存在するならば、それは「\fB書式\fP」セクションの第 2 の書式に当たる)、2
番目の部分の最初のパラメータが、解析の対象となるショートオプションを
-1 つにまとめたショートオプションズ文字列 (すなわち \fIoptsting\fP) として使用される
-(訳注: これは 2 番目の書式のことである)。
-.IP "[\fB訳注\fP]"
-第 3 の書式で、解析の対象になるパラメータをオプションから始めるときは、その前に
-\&'\fB\-\-\fP' ã\82\92ç½®ã\81\8bã\81ªã\81\91ã\82\8cã\81°ã\81ªã\82\89ã\81ªã\81\84ã\81\93ã\81¨ã\81«æ°\97ã\82\92ä»\98ã\81\91ã\81¦ã\81\84ã\81\9fã\81 ã\81\8dã\81\9fã\81\84ã\80\82
-そうしないと、\fBgetopt\fP 自体のオプションと誤解されることになる。
+1 つにまとめたショートオプションズ文字列 (すなわち \fIoptsting\fP) として使用される。
+.IP "[\fB訳注\fP]" 8
+「\fB書式\fP」セクションの第 3
+の書式で、解析の対象になるパラメータをオプションから始めるときは、その前に
+\&'\fB\-\-\fP' ã\82\92ç½®ã\81\8få¿\85è¦\81ã\81\8cã\81\82ã\82\8bã\80\82ã\81\9dã\81\86ã\81\97ã\81ªã\81\84ã\81¨ã\80\81\fBgetopt\fP
+自体のオプションと誤解されることになる。
解析の対象をファイル名などから始めるときは、'\fB\-\-\fP' を置かなくてもよい。
.PP
環境変数 \fBGETOPT_COMPATIBLE\fP
が設定されている場合や、最初のパラメータがオプションではない場合 (すなわち、'\fB\-\fP'
-ã\81§å§\8bã\81¾ã\81£ã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\81§ã\80\81ã\81\93ã\82\8cã\81¯ã\80\8c\fBæ\9b¸å¼\8f\fPã\80\8dã\81®ç¬¬ 1 ã\81®å½¢式である)、この
+ã\81§å§\8bã\81¾ã\81£ã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\81§ã\80\81ã\81\93ã\82\8cã\81¯ã\80\8c\fBæ\9b¸å¼\8f\fPã\80\8dã\82»ã\82¯ã\82·ã\83§ã\83³ã\81®ç¬¬ 1 ã\81®æ\9b¸式である)、この
\fBgetopt\fP は他のバージョンの \fBgetopt\fP(1) と互換性のある出力を生成する。
-ã\81ªã\81\8aã\80\81ã\81\9dã\81®å ´å\90\88ã\81§ã\82\82ã\80\81パラメータの並べ替えは行うし、指定が任意の引き数の認識もする
+ã\81ªã\81\8aã\80\81ã\81\9dã\81®å ´å\90\88ã\81§ã\82\82ã\82\84ã\81¯ã\82\8aパラメータの並べ替えは行うし、指定が任意の引き数の認識もする
(詳細については、「\fB互換性\fP」セクションを参照していただきたい)。
.PP
従来の \fBgetopt\fP(1)
特殊文字などがあると、それに対処することができなかった。
この問題を解決するために、この実装では、クォートした出力を生成できるようになっているが、
そうした出力は、シェルによってもう一度解釈される必要がある
-(たいていは、そのために \fBeval\fP コマンドを使用する)。
+(たいていは、そのために \fBeval\fP コマンドを使用する。[訳注: もっと詳しく言うと、
+\fBPARAM=$(getopt \-o 'a:b::c' \-\- "$@"); \fP
+\fBeval set \-\- "$PARAM"\fP といった方法を用いて、位置パラメータを再構成する])。
この出力形式を使えば、ホワイトスペースや特殊文字を保護することにはなるが、それには
\fBgetopt\fP を他のバージョンともはや互換性のない形で呼び出さなければならない
(すなわち、「\fB書式\fP」セクションの第 2 や 第 3 の書式だ)。御使用のシステムに
中の各ロングオプション名の後ろには、コロンを続けることができる。コロンが 1 個のときは、
引き数が必須だということであり、2 個のときは、
引き数は任意、すなわち、あってもなくてもよいということである。
+.RS
+.IP "[\fB訳注\fP]" 8
+ロングオプションのみを使い、ショートオプションを全く使わない場合は、\fB\-o\fP
+オプションに空文字列を渡すことで (\fB\-o ''\fP)
+それを明示的に宣言しなければならない。「\fBバグ\fP」セクションを参照。
+.RE
.TP
\fB\-n\fP,\fB \-\-name \fP\fIprogname\fP
\fBgetopt\fP(3) ルーティンが、エラーを通知する際に使用するプログラム名を指定する。
中のショートオプション各文字の後ろには、コロンを続けることができる。コロンが
1 個のときは、引き数が必須だということであり、2
個のときは、引き数は任意、すなわち、あってもなくてもよいということである。
-また、\fIshortopts\fP の最初の文字を '\fB+\fP' や '\fB\-\fP'
-ã\81«ã\81\99ã\82\8cã\81°ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81®è§£æ\9e\90ã\82\84ã\80\81å\87ºå\8a\9bã\81®ç\94\9fæ\88\90ã\81®ä»\95æ\96¹ã\81«å½±é\9f¿ã\82\92ä¸\8eã\81\88ることができる
+また、\fIshortopts\fP の先頭に '\fB+\fP' や '\fB\-\fP'
+ã\81¨ã\81\84ã\81\86æ\96\87å\97ã\82\92ä»\98ã\81\91ã\82\8cã\81°ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81®è§£æ\9e\90ã\81®ä»\95æ\96¹ã\82\84ã\80\81å\87ºå\8a\9bã\81®ç\94\9fæ\88\90ã\81®ä»\95æ\96¹ã\82\92å¤\89æ\9b´ã\81\99ることができる
(詳細については、「\fBスキャニングモード\fP」セクションを参照すること)。
.TP
\fB\-q\fP,\fB \-\-quiet\fP
では、生成される出力について説明する。一般に \fBgetopt\fP
は、シェル関数やシェルスクリプトの中で、その引き数を解析するために使うものなので、
ここで取り上げるパラメータ群が、元はと言えば、
-シェル関数を呼んだときに渡したパラメータだったというのは、
-ごく普通のことである。そこで、シェル関数を呼んだときに渡す各パラメータは、\fBgetopt\fP
-に渡されるパラメータリスト中のパラメータと 1 対 1
-で対応するように、気を付けて指定しなければならないのだ
-(「\fB用例\fP」セクションを参照)。すべての解析は、GNU \fBgetopt\fP(3)
-のルーティンによって行われる。
-.IP "[\fB訳注\fP]"
+シェル関数を呼んだときに渡したパラメータだったというのは、ごく普通のことである。
+そこで、気を付けなければならないことがある。シェル関数を呼んだときに渡す各パラメータは、
+\fBgetopt\fP に渡されるパラメータリスト中のパラメータと
+1 対 1 で対応していなければならないのだ (「\fB用例\fP」セクションを参照)。
+すべての解析は、GNU \fBgetopt\fP(3) のルーティンによって行われる。
+.IP "[\fB訳注\fP]" 8
\fBgetopt\fP の使い方の簡単な例を挙げる。
たとえば、シェル関数やシェルスクリプト中に次のように書く。
.sp
.fi
.sp
このようにして、シェル関数やスクリプトに渡された引き数群を、位置パラメータを利用して、
-どれがオプションで、どれがそのオプション引き数、どれがそれ以外か、
-わかりやすいように、処理しやすいように再構成するわけである。
-詳しくは、「\fB出力\fP」セクションや、
+どれがオプションで、どれがそのオプション引き数、どれがそれ以外か、わかりやすく、
+処理しやすいように再構成するわけである。詳しくは、「\fB出力\fP」セクションや、
「\fB用例\fP」で述べているスクリプトの見本を参照していただきたい。
.sp
「シェル関数を呼んだときに渡す各パラメータは、\fBgetopt\fP
に渡されるパラメータリスト中のパラメータと 1 対 1
-ã\81§å¯¾å¿\9cã\81\99ã\82\8bã\82\88ã\81\86ã\81«ã\80\81æ°\97ã\82\92ä»\98ã\81\91ã\81¦æ\8c\87å®\9aã\81\97なければならない」というのは、
+ã\81§å¯¾å¿\9cã\81\97ã\81¦ã\81\84なければならない」というのは、
シェル関数やシェルスクリプトに渡すパラメータでも、
それが空白などを含むようならクォートしなければならないのはもちろん、以下で説明するような
\fBgetopt\fP コマンドのパラメータの書式にも従っていなければならないということである。
モードで行うこともできるし、ホワイトスペースなどの特殊文字が、
オプション引き数やオプションとは無関係なパラメータ中にある場合に、
そうしたものを保護する形で行うこともできる (「\fBクォート\fP」セクションを参照)。
-出力はシェルスクリプト中で処理される際に、それを構成する各要素が、
-それぞれ別の独立したものに見えることになるので、(ほとんどのシェル言語では、shift
-コマンドを使って) ひとつひとつ処理することが可能になる。
+出力はシェルスクリプト中で処理される際に、出力を構成する各要素が、
+それぞれ他と区別されるものとして見えることになるので、(ほとんどのシェル言語で
+shift コマンドを使って) ひとつひとつ処理することが可能になる。
ただし、クォートなしのモードでのこの処理は、完全ではない。
要素にホワイトスペースや特殊文字が含まれていると、
-æ\80\9dã\81\84ã\81\8cã\81\91ã\81ªã\81\84ã\81¨ã\81\93ã\82\8dã\81§è¦\81ç´ ã\81\8cå\88\86å\89²ã\81\95ã\82\8cã\81¦ã\81\97ã\81¾ã\81\86ã\81\8bã\82\82ã\81\97ã\82\8cã\81ªã\81\84ã\81\8bã\82\89である。
+æ\80\9dã\81\84ã\81\8cã\81\91ã\81ªã\81\84ã\81¨ã\81\93ã\82\8dã\81§è¦\81ç´ ã\81\8cå\88\86å\89²ã\81\95ã\82\8cã\81¦ã\81\97ã\81¾ã\81\86ã\81\8bã\82\82ã\81\97ã\82\8cã\81ªã\81\84ã\81®である。
.PP
たとえば、引き数が必須なのに存在しないとか、未知のオプションがあるとかいう理由で、
パラメータの解析中に問題が起きたときは、エラーメッセージが標準エラーに表示され、
.PP
ショートオプションに対しては、1 個の '\fB\-\fP'
とオプション文字が、ひとつのパラメータとして生成される。
-ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81«å¼\95ã\81\8dæ\95°ã\81\8cã\81\82ã\82\8bå ´å\90\88ã\81¯ã\80\81次ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81\8cその引き数である。
+ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81«å¼\95ã\81\8dæ\95°ã\81\8cã\81\82ã\82\8bå ´å\90\88ã\81¯ã\80\81次ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81¯その引き数である。
オプションの引き数が任意なとき、その引き数が見つからなかった場合は、
クォーティングモードでは、次のパラメータが生成されるが、空のパラメータになる。
クォートなしのモード (互換モード) では、2 番目のパラメータは生成されない。
その後で、オプションとは無関係なパラメータが、
見つかった順序で、それぞれ独立したパラメータとして生成される。
ただし、ショートオプションズ文字列の最初の文字が '\fB\-\fP'
-ã\81®ã\81¨ã\81\8dã\81 ã\81\91ã\81¯å\88¥ã\81§ã\80\81ã\81\9dã\81®å ´å\90\88ã\81¯ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81¨ã\81¯ç\84¡é\96¢ä¿\82ã\81ªã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81®å\87ºå\8a\9bã\81\8c、
+ã\81®ã\81¨ã\81\8dã\81 ã\81\91ã\81¯å\88¥ã\81§ã\80\81ã\81\9dã\81®å ´å\90\88ã\81¯ã\80\81ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81¨ã\81¯ç\84¡é\96¢ä¿\82ã\81ªã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81®å\87ºå\8a\9bã\81¯、
入力中のそれが見つかった位置で生成される (この動作は、「\fB書式\fP」セクションの第 1
の書式が使用されている場合には、サポートされない。
その場合は、ショートオプションズ文字列の前にある '\fB\-\fP' や
互換モードでは、オプションの引き数やオプションとは無関係なパラメータ中に、
ホワイトスペースや特殊文字があると、それを適切に処理できない。
そのため、互換モードの出力を渡されたシェルスクリプトは、
-ã\81\9dã\81®å\87ºå\8a\9bã\82\92ã\81©ã\81®ã\82\88ã\81\86ã\81«å\80\8bã\80\85ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81«å\88\86å\89²ã\81\99ã\82\8cã\81°ã\82\88ã\81\84のか、わからないことになる。
+ã\81\9dã\81®å\87ºå\8a\9bã\82\92ã\81©ã\81®ã\82\88ã\81\86ã\81«å\80\8bã\80\85ã\81®ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81«å\88\86å\89²ã\81\99ã\82\8bã\81\93ã\81¨ã\81\8cæ\9c\9få¾\85ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bのか、わからないことになる。
この問題を回避するために、\fBgetopt\fP のこの実装では、クォートによる保護を提供している。
要するに、出力を生成するとき、パラメータをひとつひとつ引用符で囲んでやるのである。この出力を
(たいていは、シェルの \fBeval\fP コマンドを使って)
別のシェルスクリプト言語を使用している場合でも、この
2 つの系統のどちらかが多分使えるだろう。
.SH スキャニングモード
-ショートオプションズ文字列 (訳注: 「書式」の \fIoptstring\fP)
+ショートオプションズ文字列 (訳注: 「\fB書式\fP」の \fIoptstring\fP)
の先頭には、1 個の '\fB\-\fP' または '\fB+\fP'
を付けて、特別なスキャニングモードを指示することができる。
-「\fB書式\fP」の第 1 の呼び出し形式が使用されている場合には、
+ã\80\8c\fBæ\9b¸å¼\8f\fPã\80\8dã\82»ã\82¯ã\82·ã\83§ã\83³ã\81®ç¬¬ 1 ã\81®å\91¼ã\81³å\87ºã\81\97å½¢å¼\8fã\81\8c使ç\94¨ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bå ´å\90\88ã\81«ã\81¯ã\80\81
こうしたプラスやマイナス記号は無視されるが、そのときでも、環境変数
\fBPOSIXLY_CORRECT\fP が設定されているかどうかは、やはり調べられる (訳注: 実際には、
第 1 の書式で \fIoptstring\fP の先頭に '\fB\-\fP'
を返す。\fB\-T\fP オプションを付けて呼び出された場合は \fB4\fP を返す。
.SH 用例
\fBgetopt\fP(1) の配布では、(ba)sh と (t)csh
-用のスクリプトの見本を提供している。インストールされているなら、\fI/usr/share/getopt/\fP
-か \fI/usr/share/doc/\fP 以下の util\-linux のサブディレクトリにあるだろう。
+用のスクリプトの見本を提供している。インストール場所は
+\fI/usr/share/doc/util\-linux/getopt/\fP である
+(訳注: \fI/usr/share/doc/util\-linux/examples/\fP などかもしれない)。
.SH 環境変数
.IP POSIXLY_CORRECT
この環境変数は \fBgetopt\fP(3) ルーティンによって調べられる。これが設定されている場合、
の呼び出し形式を使わせる。
.SH バグ
\fBgetopt\fP(3)
-関数は、引き数が任意のロングオプションが、空の任意引き数を渡された場合でも、解析できる
-(だが、ショートオプションについては、それができない)。この \fBgetopt\fP(1)
+関数は、引き数が任意のロングオプションが空の任意引き数を渡された場合、それを解析できる
+(だが、ショートオプションに対しては、それができない)。一方、この \fBgetopt\fP(1)
コマンドは、空の任意引き数を、引き数が存在しないかのように処理している。
-.IP "[\fB訳注\fP]"
-詳しく言うと、\fBgetopt\fP(3) (\fBgetopt_long\fP(3)) 関数は、
-引き数が任意のロングオプションに引数がない場合と、空の引き数を渡された場合とを区別している。
-しかし、ショートオプションについては、その区別ができない。
-.sp
-この \fBgetopt\fP(1) コマンドの動作について言うと、第 2、第 3
-の書式では、ロングオプション、ショートオプションを問わず、
-引き数が任意のオプションに引き数が存在しない場合も、引き数が空文字列である場合も、
-オプションの引き数として空文字列を出力する。
-また、第 1 の書式では、引き数が任意のオプションに引き数が存在しない場合も、
-引き数が空文字列の場合も、そのオプションの引き数はまったく出力されない。
-「\fB出力\fP」セクションのショートオプションの説明を参照していただきたい。
-.sp
-要するに、この \fBgetopt\fP コマンドでは、引き数が任意のオプションについて、
-引き数が存在しない場合と引き数が空文字列である場合の区別がまったくないのである。
-だから、バグと言っても、不具合ということではなく、このコマンドと
-\fBgetopt\fP(3) 関数の仕様が微妙に違うことを言っているのだろうと思う。
+.IP "[\fB訳注\fP]" 8
+バグとは言っても、不具合ではなく、この \fBgetopt\fP コマンドが \fBgetopt\fP(3)
+関数とは、仕様が微妙に違うということを言っているらしい。すなわち、\fBgetopt\fP(3)
+(\fBgetopt_long\fP(3)) 関数は、引き数が任意のロングオプションに引数がない場合と、
+空の引き数を渡された場合とを区別している。それに対して、この \fBgetopt\fP
+コマンドの方は、ロングオプションであれ、ショートオプションであれ、
+引き数が任意のオプションに引数がない場合と、空の引き数を渡された場合とを区別せず、
+どちらも同じように処理している。
.PP
ショートオプションを全く使いたくない場合の \fBgetopt\fP
コマンドの構文は、あまり直感的ではない
(ショートオプションズ文字列を明示的に空文字列にしなければならないのだ)。
-.IP "[\fB訳注\fP]"
+.IP "[\fB訳注\fP]" 8
すなわち、\fBgetopt \-o '' \-\-longoptions ...\fP
のように使用しなければならない。
.SH 作者