X-Git-Url: http://git.osdn.net/view?p=linuxjm%2Fjm.git;a=blobdiff_plain;f=info%2FGNU_which%2Fdraft%2Ftexi%2Fwhich.texi;fp=info%2FGNU_which%2Fdraft%2Ftexi%2Fwhich.texi;h=0000000000000000000000000000000000000000;hp=72e87292d88e249eed5ce7d1292a4edc631b4f06;hb=65e730290d1c110c8d000786ab1af8e9985f045e;hpb=a7519b7a770569743787aff32aabf0c2962a131d diff --git a/info/GNU_which/draft/texi/which.texi b/info/GNU_which/draft/texi/which.texi deleted file mode 100644 index 72e87292..00000000 --- a/info/GNU_which/draft/texi/which.texi +++ /dev/null @@ -1,278 +0,0 @@ -\input texinfo-ja @c -*-texinfo-*- -@c =========================================================================== -@c -@c This file was generated with po4a. Translate the source file. -@c -@c =========================================================================== - -@c %**start of header -@setfilename which.info -@documentencoding UTF-8 -@documentlanguage ja -@settitle @command{which}: コマンドのフルパス表示 -@include version.texi -@dircategory System administration -@direntry -* Which: (which). コマンドのフルパスを表示 -@end direntry -@c %**end of header - -@setchapternewpage odd - -@ifinfo -@format - -@c !BEGIN INTRO -@c !END INTRO -このファイルは `which' version 2.x@ を説明するものです。 - -@c !BEGIN COPYING -Copyright @copyright{} 2000 - 2015, by - -Carlo Wood, Run on IRC -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 - -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 - -@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. -@end ignore -@c !END COPYING -@end ifinfo - -@titlepage -@title Which -@subtitle コマンドのフルパス表示 -@sp 1 -@subtitle 編集版 @value{EDITION}, Which バージョン @value{VERSION} -@subtitle @value{UPDATED} -@c !BEGIN AUTHORS -@author Carlo Wood <@email{carlo@@gnu.org}> -@c !END AUTHORS -@page -@vskip 0pt plus 1filll -Copyright @copyright{} 2000 - 2015, by - -Carlo Wood, Run on IRC 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 - -@end titlepage - -@ifnottex -@node Top, which プログラム, (dir), (dir) -@top @command{which}: コマンドのフルパス表示 -@end ifnottex - -@ifinfo -@c !BEGIN NAME -@c !END NAME -@command{which} プログラムは(シェル)コマンドのフルパスを表示します。 - -@noindent -This file documents @command{which} version @value{VERSION}, updated -@value{UPDATED}. -@end ifinfo - -@menu -* which プログラム:: @command{which} プログラム -* which の起動:: @command{which} の起動方法 -* オプションの概要:: コマンドラインオプションの概要 -* 返り値:: @command{which} が返す値 -* 例:: コマンドの実行例 -* バグ:: 既知のバグ -* 関連項目:: 関連する UNIX コマンド -* さくいん:: さくいん -@end menu - -@node which プログラム, which の起動, Top, Top -@chapter @command{which} プログラム -@cindex Description of @command{which} - -@c !BEGIN DESCRIPTION -@c !END DESCRIPTION -@command{which} は 1 -つまたは複数の引数を取ります。その引数それぞれに対して、その引数がシェルプロンプトから入力された際に、実行されることになる実行モジュールのフルパスを -stdout に出力します。 これを実現する際には、環境変数 @env{PATH} に列記されたディレクトリ内から実行ファイルやスクリプトを検索します。 -これは @command{bash(1)} と同じアルゴリズムを用いています。 - -@node which の起動, オプションの概要, which プログラム, Top -@chapter @command{which} の実行 -@cindex @command{which} の実行 -@cindex Synopsis - -@noindent -@command{which} の実行書式は以下のとおりです。 - -@c !BEGIN SYNOPSIS -@example -which [options] [--] programname [...] -@end example -@c !END SYNOPSIS - -@menu -* オプションの概要:: オプション概要 -@end menu - -@node オプションの概要, 返り値, which の起動, Top -@chapter オプションの概要 -@cindex Options, command line -@cindex Command line Options -@cindex Overview of command line options - -@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 そのものを含む alias -において、本オプションを合わせて利用すると便利です。 たとえば以下です。@* @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 | 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} 内のディレクトリにうち、ドットで始まるディレクトリは除外します。 - -@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} に合致した場合、チルダを表示します。 このオプションは root ユーザーが実行した際には無視されます。 - -@cindex @option{--tty-only} -@item --tty-only -tty 上でない場合、この右側に指定されたオプションの実行を停止します。 - -@cindex @option{--version} -@cindex @option{-v} -@cindex @option{-V} -@item --version, -v, -V -バージョン情報を標準出力して正常終了します。 - -@cindex @option{--help} -@item --help -利用方法を標準出力して正常終了します。 - -@end table -@c !END OPTIONS - -@node 返り値, 例, オプションの概要, Top -@chapter 返り値 -@cindex Return value of @command{which} - -@c !BEGIN RETURNVALUE -@c !END RETURNVALUE -@command{which} は、処理に失敗した引数の数を返します。また @file{programname} が指定されなかった場合は -1 -を返します。 - -@node 例, バグ, 返り値, Top -@chapter 例 -@cindex Examples -@cindex aliases, handling of - -@c !BEGIN EXAMPLE -本ユーティリティーを利用するには、@command{which} に対して、エイリアスを追加する (C シェルの場合) 、あるいはシェル関数を追加する -(Bourne シェル) 方法が推奨されます。たとえば以下のようにします。 - -[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 -この方法にすると、端末から起動した際には、わかりやすく ~/ や ./ を表示します。一方でスクリプトから実行した際には、フルパスを表示します。 - -@example -@group -> which q2 -~/bin/q2 -> echo `which q2` -/home/carlo/bin/q2 -@end group -@end example -@c !END EXAMPLE - -@node バグ, 関連項目, 例, Top -@chapter バグ -@cindex Bugs, known - -@c !BEGIN BUGS -@c !END BUGS -@env{HOME} ディレクトリは、環境変数 @env{HOME} -を調べることで決定されますが、この変数が存在しない場合には、その処理がキャンセルされます。@command{which} は 2 -つの同等のディレクトリであっても、その 1 つにシンボリックリンクを使ったパスが含まれている場合に、別のディレクトリと取り扱ってしまいます。 - -@node 関連項目, さくいん, バグ, Top -@chapter 関連項目 - -@c !BEGIN SEEALSO -@c !END SEEALSO -@command{bash(1)} - -@node さくいん, , 関連項目, Top -@comment node-name, next, previous, up -@unnumbered さくいん - -@printindex cp - -@contents -@bye