OSDN Git Service

info/GNU_which: Rebuild GNU_which's info directory.
[linuxjm/jm.git] / info / GNU_which / draft / which-ja.texi
diff --git a/info/GNU_which/draft/which-ja.texi b/info/GNU_which/draft/which-ja.texi
new file mode 100644 (file)
index 0000000..53fbe9c
--- /dev/null
@@ -0,0 +1,325 @@
+\input texinfo   @c -*-texinfo-*-
+@c ===========================================================================
+@c
+@c This file was generated with po4a. Translate the source file.
+@c
+@c ===========================================================================
+@c %**start of header
+@setfilename which-ja.info
+@documentencoding UTF-8
+@settitle @command{which}: コマンドのフルパスを表示する
+@include version.texi
+@dircategory System administration
+@direntry
+* Which-ja: (which-ja).      Show full path of commands.
+@end direntry
+@c %**end of header
+
+@setchapternewpage odd
+
+@ifinfo
+@format
+
+@c !BEGIN INTRO
+@c !END INTRO
+This file documents `which' version 2.x@.
+
+@c !BEGIN COPYING
+Copyright @copyright{} 2000 - 2015, by
+
+Carlo Wood, Run on IRC <carlo@@alinoe.com>
+RSA-1024 0x624ACAD5 1997-01-26                    Sign & Encrypt
+Fingerprint16 = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
+
+Japanese Translation Copyright @copyright{} 2023 Linux JM project
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+@end format
+
+@c @ignore
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided also that the
+section entitled ``GNU General Public License'' is included exactly as
+in the original, and provided that the entire resulting derived work is
+distributed under the terms of a permission notice identical to this
+one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that the section entitled ``GNU General Public License'' may be
+included in a translation approved by the author instead of in the
+original English.
+
+Note (by the translator): Actually, ``GNU General Public License''
+is not included in the original version of this info manual.  
+You will get a copy of it at <https://www.gnu.org/licenses/>.
+@c @end ignore
+@c !END COPYING
+@end ifinfo
+
+@titlepage
+@title Which
+@subtitle コマンドのフルパスを表示する
+@sp 1
+@subtitle Edition @value{EDITION}, for Which Version @value{VERSION}
+@subtitle @value{UPDATED}
+@c !BEGIN AUTHORS
+@author Carlo Wood <@email{carlo@@gnu.org}>
+@author Translated by Linux JM project
+@c !END AUTHORS
+@page
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2000 - 2015, by
+
+Carlo Wood, Run on IRC <carlo@@alinoe.com> RSA-1024 0x624ACAD5 1997-01-26
+Sign & Encrypt Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF
+61
+@sp 1
+Japanese Translation Copyright @copyright{} 2023 Linux JM project
+
+@c The history of the translation
+@c     Translated (version 2.21) Fri Mar  3 11:49:31 JST 2023
+@c         by Chonan Yoichi <cyoichi@maple.con.ne.jp>
+
+@end titlepage
+
+@ifnottex
+@node Top, Which Program, (dir), (dir)
+@top @command{which}: コマンドのフルパスを表示する
+@end ifnottex
+
+@ifinfo
+@c !BEGIN NAME
+@c !END NAME
+@command{which} プログラムは、(シェル) コマンドのフルパスを表示する。
+
+@noindent
+このファイルは、@command{which} version @value{VERSION}
+(@value{UPDATED} に更新) について解説している。
+
+@noindent
+【読者への御注意】これは、GNU 版の @command{which} コマンドのマニュアルである。
+@command{which} の実装には、いくつかの系統があるので、お手元の @command{which}
+が別系統であるときは、オプションなどがここで説明しているものとかなり違うかもしれない。
+そのときは、お手元の @command{which} に付属するマニュアルをご覧になっていただきたい。
+@end ifinfo
+
+@menu
+* Which Program::            @command{which} プログラムについて
+* Invoking Which::           @command{which} の起動
+* Option Summary::           コマンドラインオプション一覧
+* Return Value::             @command{which} の返り値
+* Example::                  用例
+* Bugs::                     既知のバグ
+* See Also::                 関連する UNIX コマンド
+* Index::                    索引
+@end menu
+
+@node Which Program, Invoking Which, Top, Top
+@chapter @command{which} プログラムについて
+@cindex @command{which} の説明
+
+@c !BEGIN DESCRIPTION
+@c !END DESCRIPTION
+@command{Which} は、ひとつ以上の引数を取り、
+そうした引数のそれぞれについて、それがシェルのプロンプトから入力されていたら、
+実行されていたであろう実行ファイルのフルパスを標準出力に表示する。@command{Which}
+は、それを行うに当たり、@command{bash(1)} と同じアルゴリズムを使って、環境変数
+@env{PATH} にリストされたディレクトリを調べ、実行ファイルやスクリプトを捜す。
+
+@node Invoking Which, Option Summary, Which Program, Top
+@chapter @command{which} の起動
+@cindex @command{which} の起動
+@cindex 書式
+
+@noindent
+@command{which} 起動の書式は、次のとおりである。
+
+@c !BEGIN SYNOPSIS
+@example
+which [options] [--] programname [...]
+@end example
+@c !END SYNOPSIS
+
+@c 以下のメニューはない方がよいので、コメントにしておく。
+@c @menu
+@c * Option Summary::           Option summary
+@c @end menu
+
+@node Option Summary, Return Value, Invoking Which, Top
+@chapter オプション一覧
+@cindex オプション、コマンドライン
+@cindex コマンドライン・オプション
+@cindex コマンドラインオプション一覧
+
+@c !BEGIN OPTIONS
+@table @samp
+@cindex @option{--all}
+@cindex @option{-a}
+@item --all
+@itemx -a
+@env{PATH} 中で最初に引数に一致したものだけでなく、一致したすべての実行ファイルを表示する。
+
+@cindex @option{--read-alias}
+@cindex @option{-i}
+@item --read-alias
+@itemx -i
+標準入力からエイリアスを読み込んで、引数に一致するものを標準出力に書き出す。
+このオプションは、which コマンドの代わりにエイリアスを使用する場合に、その中で使うとよい。
+たとえば、次のようにだ。@*
+@code{alias which='alias | which -i'}
+
+@cindex @option{--skip-alias}
+@item --skip-alias
+@option{--read-alias} オプションが指定されていても、それを無視する。
+このオプションは、which の代わりに使うエイリアスや関数で @option{--read-alias}
+オプションを使用している場合に、通常のバイナリを明示的に探すのに役に立つ。
+
+@cindex @option{--read-functions}
+@item --read-functions
+標準入力からシェル関数の定義を読み込んで、引数に一致するものを標準出力に書き出す。
+このオプションは、which コマンドの代わりにシェル関数を使用する場合に、
+その中で使うとよい。たとえば、次のようにだ。@* @code{which () @{ declare -f |
+/usr/bin/which --read-functions $@@; @}@*export -f which}
+
+@cindex @option{--skip-functions}
+@item --skip-functions
+@option{--read-functions} が指定されていても、それを無視する。
+このオプションは、which の代わりに使うエイリアスや関数で @option{--read-functions}
+オプションを使用している場合に、通常のバイナリを明示的に捜すのに役に立つ。
+
+@cindex @option{--skip-dot}
+@item --skip-dot
+環境変数 @env{PATH} 中のドット (.) で始まるパスをスキップする。
+@footnote{環境変数 @env{PATH} に '.' や './bin'、'.local'
+などが登録されている場合のことを言っている。'$HOME/.local'
+といったディレクトリのことではない。そのへんの事情は、@option{--show-dot}
+でも同じである。}
+
+@cindex @option{--skip-tilde}
+@item --skip-tilde
+@env{PATH} 中のチルダ (~) で始まるディレクトリと、@env{HOME}
+ディレクトリ以下にある実行ファイルをスキップする。
+
+@cindex @option{--show-dot}
+@item --show-dot
+@env{PATH} 中にドット (.) で始まるパスがあるとき、
+それに対応するディレクトリで引数に一致する実行ファイルが見つかったら、
+フルパスではなく "./programname" などと表示する。
+
+@cindex @option{--show-tilde}
+@item --show-tilde
+ディレクトリに @env{HOME} ディレクトリが含まれているときは、チルダを出力する。
+このオプションは、@command{which} が root の権限で実行されている場合には無視される。
+
+@cindex @option{--tty-only}
+@item --tty-only
+出力が端末でない場合は、これより右にあるオプションの処理をしない。
+@footnote{このオプションに効果があるのは、@option{--show-dot},
+@option{--show-tilde}, @option{--skip-dot}, @option{--skip-tilde}
+に対してだけのようである。}
+
+@cindex @option{--version}
+@cindex @option{-v}
+@cindex @option{-V}
+@item --version, -v, -V
+バージョン情報を標準出力に表示して、正常終了する。
+
+@cindex @option{--help}
+@item --help
+使用法を標準出力に表示して、正常終了する。
+
+@end table
+@c !END OPTIONS
+
+@node Return Value, Example, Option Summary, Top
+@chapter 返り値
+@cindex @command{which} の返り値
+
+@c !BEGIN RETURNVALUE
+@c !END RETURNVALUE
+@command{Which} は、検索に失敗した引数の個数を返す。引数に
+@file{programname} が指定されなかった場合には、-1 を返す。
+
+@node Example, Bugs, Return Value, Top
+@chapter 用例
+@cindex 用例
+@cindex エイリアスの使用
+
+@c !BEGIN EXAMPLE
+このユーティリティの使用に当たっては、以下のように、エイリアスや
+(C shell の場合) シェル関数に (Bourne shell の場合)、@command{which}
+コマンドの代わりに使用するものを追加しておくことをおすすめする。
+
+[ba]sh:
+
+@example
+@group
+which ()
+@{
+  (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@@
+@}
+export -f which
+@end group
+@end example
+
+[t]csh:
+
+@example
+@group
+alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
+@end group
+@end example
+
+@noindent
+このようにしておくと、which をプロンプトから実行したときには、パスを ~/
+や ./ という読みやすい形で表示するが、スクリプトから使用した場合には、
+通常どおりフルパスの表示になる。@footnote{
+実際には、こうした関数やエイリアスを端末のプロンプトから実行しようと、
+スクリプトから実行しようと、表示に変わりはない。
+出力先が、標準出力や標準エラーか、それ以外かで違いが生じるようである
+(実行例の二番目では、標準入力に出力している)。念のため、ご自分でお試しいただきたい。}
+
+@example
+@group
+> which q2
+~/bin/q2
+> echo `which q2`
+/home/carlo/bin/q2
+@end group
+@end example
+@c !END EXAMPLE
+
+@node Bugs, See Also, Example, Top
+@chapter バグ
+@cindex 既知のバグ
+
+@c !BEGIN BUGS
+@c !END BUGS
+@env{HOME} ディレクトリの特定は、環境変数 @env{HOME}
+を調べることで行われるが、この変数が存在しない場合は、@env{HOME}
+ディレクトリの特定作業は打ち切られる。@footnote{
+この記述は古いようだ。パッケージ同梱の NEWS ファイルによれば、which-2.19
+以来、環境変数 @env{HOME} が設定されていない場合は、/etc/passwd
+ファイルが調べられ、そこでも指定されていない場合は、'/'
+がホームディレクトリになるとのことである。}
+また、@command{Which} は、二つのディレクトリが事実上同じものであっても、
+片方のパスにシンボリックリンクが含まれている場合は、別のディレクトリと見なすことになる。
+
+@node See Also, Index, Bugs, Top
+@chapter 関連項目
+
+@c !BEGIN SEEALSO
+@c !END SEEALSO
+@command{bash(1)}
+
+@node Index, , See Also, Top
+@comment node-name,    next,  previous,       up
+@unnumbered 索引
+
+@printindex cp
+
+@contents
+@bye