identのヘルプ・マニュアル
日本語 英語
ident --help
man ident
IDENT(1) IDENT(1)
名称
ident - ファイル内の RCS キーワードを読み出す
書式
ident [ -q ] [ -V ] [ file ... ]
解説
ident は、指定されたファイルがあればそのファイルから、指定がない場合に
は標準入力から、 $keyword: text $ なるパターンを検索します。
これらのパターンは、通常 RCS の co(1) コマンドにより自動的に挿入され ま
す が、手作業で入れることも可能です。オプション -q を指定すると、ファイ
ル中にキーワードが発見できなくても警告メッセージを出力しません。 -V を
指定すると、 ident のバージョン番号を表示します。
ident は、テキストファイルと同様にオブジェクトファイルやダンプファイル
にも使用することができます。たとえば、以下の C 言語プログラム f.c で、
#include
static char const rcsid[] =
"$Id: f.c,v 1.5 1999/08/27 23:36:42 peter Exp $";
int main() { return printf("%s\n", rcsid) == EOF; }
f.c が f.o にコンパイルされているなら、以下のコマンド
ident f.c f.o
は、次のような出力を行います。
f.c:
$Id: f.c,v 1.5 1999/08/27 23:36:42 peter Exp $
f.o:
$Id: f.c,v 1.5 1999/08/27 23:36:42 peter Exp $
C 言語プログラムで上記のような文字列 rcsid が定義され、かつ使われていな
い とき、 lint(1) が警告を出したり、 C コンパイラによっては最適化により
文字列を削除する場合があります。もっとも、よい解決策は上のプログラム 例
のように文字列 rcsid を使うことです。
* が サ ポ ートする keyword でなくても、すべての $key-
ident は 、
word: text $ パターンを表示します。これにより、 $XConsortium$ のよう な
非標準の keyword についても情報が得られます。
キーワード
つ ぎに現在、 co(1) が扱う keyword を挙げます。デフォルトでは、すべての
時刻は協定世界時 (UTC しばしば GMTと呼ばれます) で表されますが、チェ ッ
ク アウトのときに、 co の -zzone オプションを使ったファイルについては、
数字によるタイムゾーンが付加されます。
$Author$
そのリビジョンをチェックインしたユーザ名です。
$Date$ そのリビジョンをチェックインした日付と時刻です。
$Header$
RCS ファイルのフルパス名を含んだ標準のヘッダ、リビジョン番号、作
者、状態、およびロックされている場合にはロックした人です。
$Id$ RCS ファイルの名前がフルパスでないことを除いて、 $Header$, と同
じです。
$Locker$
そのリビジョンをロックした人のユーザ名 (ロックされていない場合は
空白) です。
$Log$ チェックインのときに書かれたログメッセージです。 ident の目的と
しては、 $RCSfile$ と等価です。
$Name$ リビジョンをチェックアウトするときに使うシンボル名です(ないか も
しれません)。
$RCSfile$
フルパスでない RCS ファイルの名前です。
$Revision$
そのリビジョンのリビジョン番号です。
$Source$
RCS ファイルのフルパス名です。
$State$
rcs(1) or ci(1) の -s オプションで付けられたそのリビジョンの状態
です。
co(1) は以下の文字をエスケープシーケンスで表現することにより、キーワ ー
ドの文字列の形を保ちます。
char escape sequence
tab \t
newline \n
space \040
$ \044
\ \\
作者
Author: Walter F. Tichy.
Manual Page Revision: 1.5; Release Date: 1999/08/27.
Copyright © 1982, 1988, 1989 Walter F. Tichy.
Copyright © 1990, 1992, 1993 Paul Eggert.
関連項目
ci(1), co(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
rcsfile(5)
Walter F. Tichy, RCS--A System for Version Control, Software--Practice
& Experience 15, 7 (July 1985), 637-654.
GNU 1999/08/27 IDENT(1)
IDENT(1) IDENT(1)
NAME
ident - identify RCS keyword strings in files
SYNOPSIS
ident [ -q ] [ -V ] [ file ... ]
DESCRIPTION
ident searches for all instances of the pattern $keyword: text $ in the
named files or, if no files are named, the standard input.
These patterns are normally inserted automatically by the RCS command
co(1), but can also be inserted manually. The option -q suppresses the
warning given if there are no patterns in a file. The option -V prints
ident’s version number.
ident works on text files as well as object files and dumps. For exam-
ple, if the C program in f.c contains
#include
static char const rcsid[] =
"$Id: f.c,v 5.4 1993/11/09 17:40:15 eggert Exp $";
int main() { return printf("%s\n", rcsid) == EOF; }
and f.c is compiled into f.o, then the command
ident f.c f.o
will output
f.c:
$Id: f.c,v 5.4 1993/11/09 17:40:15 eggert Exp $
f.o:
$Id: f.c,v 5.4 1993/11/09 17:40:15 eggert Exp $
If a C program defines a string like rcsid above but does not use it,
lint(1) may complain, and some C compilers will optimize away the
string. The most reliable solution is to have the program use the
rcsid string, as shown in the example above.
ident finds all instances of the $keyword: text $ pattern, even if key-
word is not actually an RCS-supported keyword. This gives you informa-
tion about nonstandard keywords like $XConsortium$.
KEYWORDS
Here is the list of keywords currently maintained by co(1). All times
are given in Coordinated Universal Time (UTC, sometimes called GMT) by
default, but if the files were checked out with co’s -zzone option,
times are given with a numeric time zone indication appended.
$Author$
The login name of the user who checked in the revision.
$Date$ The date and time the revision was checked in.
$Header$
A standard header containing the full pathname of the RCS file,
the revision number, the date and time, the author, the state,
and the locker (if locked).
$Id$ Same as $Header$, except that the RCS filename is without a
path.
$Locker$
The login name of the user who locked the revision (empty if not
locked).
$Log$ The log message supplied during checkin. For ident’s purposes,
this is equivalent to $RCSfile$.
$Name$ The symbolic name used to check out the revision, if any.
$RCSfile$
The name of the RCS file without a path.
$Revision$
The revision number assigned to the revision.
$Source$
The full pathname of the RCS file.
$State$
The state assigned to the revision with the -s option of rcs(1)
or ci(1).
co(1) represents the following characters in keyword values by escape
sequences to keep keyword strings well-formed.
char escape sequence
tab \t
newline \n
space \040
$ \044
\ \\
IDENTIFICATION
Author: Walter F. Tichy.
Manual Page Revision: 5.4; Release Date: 1993/11/09.
Copyright © 1982, 1988, 1989 Walter F. Tichy.
Copyright © 1990, 1992, 1993 Paul Eggert.
SEE ALSO
ci(1), co(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
rcsfile(5)
Walter F. Tichy, RCS--A System for Version Control, Software--Practice
& Experience 15, 7 (July 1985), 637-654.
GNU 1993/11/09 IDENT(1)