[JM:01569] [POST:DP] util-linux look.1

アーカイブの一覧に戻る
Yuichi SATO ysato****@ybb*****
2019年 7月 28日 (日) 21:31:39 JST


<STATUS>
stat: DP
ppkg: util-linux
page: look.1
date: 2019/07/28
mail: ysato****@ybb*****
name: SATO Yuichi
</STATUS>


.\" Copyright (c) 1990, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)look.1	8.1 (Berkeley) 6/14/93
.\"
.\" Translated Fri Dec 23 JST 1994 by NetBSD jman proj. <jman****@spa*****>
.\" Updated Thu Apr 13 JST 2000 by Kentaro Shirakata <argra****@ub32*****>
.\" Updated & Modified Sun Jul 28 20:59:38 JST 2019
.\"         by Yuichi SATO <ysato****@ybb*****>
.\"
.TH LOOK 1 "June 2011" "util-linux" "User Commands"
.\"O .SH NAME
.SH 名前
.\"O look \- display lines beginning with a given string
look \- 指定した文字列で始まる行を表示する
.\"O .SH SYNOPSIS
.SH 書式
.B look
[options]
.IR "string " [ file ]
.\"O .SH DESCRIPTION
.SH 説明
.\"O The
.\"O .B look
.\"O utility displays any lines in
.\"O .I file
.\"O which contain
.\"O .IR string .
.B look
ユーティリティは、
.I file
の各行のうち、
.I string
で指定された文字列で始まっている行を表示する。
.\"O As
.\"O .B look
.\"O performs a binary search, the lines in
.\"O .I file
.\"O must be sorted (where
.\"O .BR sort (1)
.\"O was given the same options
.\"O .BR "\-d " and/or " \-f " that
.\"O .B look
.\"O is invoked with).
.B look
は二分検索を使っているため、
.I file
で指定するファイルはソートしておかなければならない
.RB ( look
で
.B "\-d"
オプションを使うときにはソートするときの
.BR sort (1)
にも
.B "\-d"
を使い、
.B "\-f"
オプションを使うときは
.BR sort (1)
でも
.B "\-f"
を使うこと)。
.PP
.\"O If
.\"O .I file
.\"O is not specified, the file
.\"O .I /usr/share/dict/words
.\"O is used, only alphanumeric characters are compared and the case of
.\"O alphabetic characters is ignored.
.I file
が指定されなかった場合は
.I /usr/share/dict/words
が使用され、
アルファベットと数字だけで比較され、
アルファベットの大文字小文字の違いは無視される。
.\"O .SH OPTIONS
.SH オプション
.TP
.BR \-a , " \-\-alternative"
.\"O Use the alternative dictionary file.
別の辞書を使用する。
.TP
.BR \-d , " \-\-alphanum"
.\"O Use normal dictionary character set and order, i.e. only blanks and
.\"O alphanumeric characters are compared.  This is on by default if no file is
.\"O specified.
通常の辞書で使用されている空白とアルファベットと数字だけを
比較対象とする。
これはファイルが指定されていない場合のデフォルトである。

.\"O Note that blanks have been added to dictionary character set for
.\"O compatibility with \fBsort \-d\fR command since version 2.28.
バージョン 2.28 以降で、\fBsort \-d\fR との互換性を持たせるため、
空白が辞書の文字セットに追加された点に注意すること。
.TP
.BR \-f , " \-\-ignore\-case"
.\"O Ignore the case of alphabetic characters.  This is on by default if no file is
.\"O specified.
アルファベットの大文字、小文字を区別しない。
これはファイルが指定されていない場合のデフォルトである。
.TP
.BR \-t , " \-\-terminate " \fIcharacter\fR
.\"O Specify a string termination character, i.e. only the characters
.\"O in \fIstring\fR up to and including the first occurrence of \fIcharacter\fR
.\"O are compared.
文字列の終端文字を指定する。
つまり、\fIstring\fR のうち \fIcharacter\fR が最初に出てくるところまで
(\fIcharacter\fR を含む) が比較の対象となる。
.TP
.BR \-V , " \-\-version"
.\"O Display version information and exit.
バージョン情報を表示して、終了する。
.TP
.BR \-h , " \-\-help"
.\"O Display help text and exit.
ヘルプを表示して、終了する。
.PP
.SH 返り値
.\"O The
.\"O .B look
.\"O utility exits 0 if one or more lines were found and displayed, 1 if
.\"O no lines were found, and >1 if an error occurred.
.B look
ユーティリティは、
指定の文字列で始まる行が見つかった場合は 0 を、
見つからなかった場合は 1 を、エラーが起きた場合は 2 以上の値を返す。
.\"O .SH EXAMPLE
.SH 例
.RS
.nf
sort -d /etc/passwd -o /tmp/look.dict
look -t: root:foobar /tmp/look.dict
.nf
.RE
.\"O .SH ENVIRONMENT
.SH 環境変数
.TP
.B WORDLIST
.\"O Path to a dictionary file.  The environment variable has greater priority
.\"O than the dictionary path defined in FILES segment.
単語ファイルのパス。
環境変数は「ファイル」セクションで定義される単語ファイルより
優先される。
.\"O .SH FILES
.SH ファイル
.IP "\fB/usr/share/dict/words\fR" 4
.\"O the dictionary
デフォルトで使用される単語ファイル
.IP "\fB/usr/share/dict/web2\fR" 4
.\"O the alternative dictionary
もう一つの単語ファイル
.\"O .SH "SEE ALSO"
.SH 関連項目
.BR grep (1),
.BR sort (1)
.\"O .SH HISTORY
.SH 履歴
.\"O The
.\"O .B look
.\"O utility appeared in Version 7 AT&T Unix.
.B look
ユーティリティは Version 7 AT&T Unix から登場した。
.\"O .SH AVAILABILITY
.SH 入手方法
.\"O The look command is part of the util-linux package and is available from
.\"O https://www.kernel.org/pub/linux/utils/util-linux/.
look コマンドは、util-linux パッケージの一部であり、
https://www.kernel.org/pub/linux/utils/util-linux/
から入手できる。



linuxjm-discuss メーリングリストの案内
アーカイブの一覧に戻る