| 1 |
.ds Rv 5.10.1 |
| 2 |
.ds Dt 2025-12-02 |
| 3 |
.ds i \&\s-1ISO\s0 |
| 4 |
.ds r \&\s-1RCS\s0 |
| 5 |
.ds u \&\s-1UTC\s0 |
| 6 |
.ds o \*r file |
| 7 |
.ds iD 5.4 1993/11/09 17:40:15 eggert Exp |
| 8 |
.if n .ds - \%-- |
| 9 |
.if t .ds - \(em |
| 10 |
.TH IDENT 1 "\*(Dt" "GNU RCS \*(Rv" |
| 11 |
.SH NAME |
| 12 |
ident \- identify RCS keyword strings in files |
| 13 |
.SH SYNOPSIS |
| 14 |
.B ident |
| 15 |
[ |
| 16 |
.B \-q |
| 17 |
] [ |
| 18 |
.B \-V |
| 19 |
] [ |
| 20 |
.I file |
| 21 |
\&.\|.\|. ] |
| 22 |
.SH DESCRIPTION |
| 23 |
.B ident |
| 24 |
searches for all instances of the pattern |
| 25 |
.BI $ keyword : "\ text\ " $ |
| 26 |
in the named files or, if no files are named, the standard input. |
| 27 |
.PP |
| 28 |
These patterns are normally inserted automatically by the \*r command |
| 29 |
.BR co (1), |
| 30 |
but can also be inserted manually. |
| 31 |
The option |
| 32 |
.B \-q |
| 33 |
suppresses |
| 34 |
the warning given if there are no patterns in a file. |
| 35 |
The option |
| 36 |
.B \-V |
| 37 |
prints \*r's version number. |
| 38 |
.PP |
| 39 |
.B ident |
| 40 |
works on text files as well as object files and dumps. |
| 41 |
For example, if the C program in |
| 42 |
.B f.c |
| 43 |
contains |
| 44 |
.IP |
| 45 |
.ft 3 |
| 46 |
#include <stdio.h> |
| 47 |
.br |
| 48 |
static char const rcsid[] = |
| 49 |
.br |
| 50 |
\&"$\&Id: f.c,v \*(iD $\&"; |
| 51 |
.br |
| 52 |
int main() { return printf(\&"%s\en\&", rcsid) == EOF; } |
| 53 |
.ft P |
| 54 |
.LP |
| 55 |
and |
| 56 |
.B f.c |
| 57 |
is compiled into |
| 58 |
.BR f.o , |
| 59 |
then the command |
| 60 |
.IP |
| 61 |
.B "ident f.c f.o" |
| 62 |
.LP |
| 63 |
will output |
| 64 |
.nf |
| 65 |
.IP |
| 66 |
.ft 3 |
| 67 |
f.c: |
| 68 |
$\&Id: f.c,v \*(iD $ |
| 69 |
f.o: |
| 70 |
$\&Id: f.c,v \*(iD $ |
| 71 |
.ft |
| 72 |
.fi |
| 73 |
.PP |
| 74 |
If a C program defines a string like |
| 75 |
.B rcsid |
| 76 |
above but does not use it, |
| 77 |
.BR lint (1) |
| 78 |
may complain, and some C compilers will optimize away the string. |
| 79 |
The most reliable solution is to have the program use the |
| 80 |
.B rcsid |
| 81 |
string, as shown in the example above. |
| 82 |
.PP |
| 83 |
.B ident |
| 84 |
finds all instances of the |
| 85 |
.BI $ keyword : "\ text\ " $ |
| 86 |
pattern, even if |
| 87 |
.I keyword |
| 88 |
is not actually an \*r-supported keyword. |
| 89 |
This gives you information about nonstandard keywords like |
| 90 |
.BR $\&XConsortium$ . |
| 91 |
.PP |
| 92 |
The pattern normally requires a colon and a space immediately |
| 93 |
after the keyword and a space immediately before the terminating |
| 94 |
.BR $ , |
| 95 |
but for Subversion 1.2 (and later) compatibility, |
| 96 |
.B ident |
| 97 |
will also recognize the pattern |
| 98 |
.BI $ keyword :: "\ text\ " $ |
| 99 |
(i.e., two colons and a space) |
| 100 |
and the pattern |
| 101 |
.BI $ keyword :: "\ text\ #" $ |
| 102 |
(likewise, with a hash before the terminating |
| 103 |
.BR $ ). |
| 104 |
These are the fixed-width keyword syntax. |
| 105 |
To summarize, the three recognized patterns are: |
| 106 |
.IP |
| 107 |
.BI $ keyword : "\ text\ " $ |
| 108 |
.br |
| 109 |
.BI $ keyword :: "\ text\ " $ |
| 110 |
.br |
| 111 |
.BI $ keyword :: "\ text\ #" $ |
| 112 |
.br |
| 113 |
.SH KEYWORDS |
| 114 |
Here is the list of keywords currently maintained by |
| 115 |
.BR co (1). |
| 116 |
All times are given in Coordinated Universal Time (\*u, |
| 117 |
sometimes called \&\s-1GMT\s0) by default, but if the files |
| 118 |
were checked out with |
| 119 |
.BR co 's |
| 120 |
.BI \-z zone |
| 121 |
option, times are given with a numeric time zone indication appended. |
| 122 |
.TP |
| 123 |
.B $\&Author$ |
| 124 |
The login name of the user who checked in the revision. |
| 125 |
.TP |
| 126 |
.B $\&Date$ |
| 127 |
The date and time the revision was checked in. |
| 128 |
.TP |
| 129 |
.B $\&Header$ |
| 130 |
A standard header containing the full \*o name, the |
| 131 |
revision number, the date and time, the author, the state, |
| 132 |
and the locker (if locked). |
| 133 |
.TP |
| 134 |
.B $\&Id$ |
| 135 |
Same as |
| 136 |
.BR $\&Header$ , |
| 137 |
except that the \*o name is without directory components. |
| 138 |
.TP |
| 139 |
.B $\&Locker$ |
| 140 |
The login name of the user who locked the revision (empty if not locked). |
| 141 |
.TP |
| 142 |
.B $\&Log$ |
| 143 |
The log message supplied during checkin. |
| 144 |
For |
| 145 |
.BR ident 's |
| 146 |
purposes, this is equivalent to |
| 147 |
.BR $\&RCSfile$ . |
| 148 |
.TP |
| 149 |
.B $\&Name$ |
| 150 |
The symbolic name used to check out the revision, if any. |
| 151 |
.TP |
| 152 |
.B $\&RCSfile$ |
| 153 |
The \*o name without directory components. |
| 154 |
.TP |
| 155 |
.B $\&Revision$ |
| 156 |
The revision number assigned to the revision. |
| 157 |
.TP |
| 158 |
.B $\&Source$ |
| 159 |
The full \*o name. |
| 160 |
.TP |
| 161 |
.B $\&State$ |
| 162 |
The state assigned to the revision with the |
| 163 |
.B \-s |
| 164 |
option of |
| 165 |
.BR rcs (1) |
| 166 |
or |
| 167 |
.BR ci (1). |
| 168 |
.PP |
| 169 |
.BR co (1) |
| 170 |
represents the following characters in keyword values by escape sequences |
| 171 |
to keep keyword strings well-formed. |
| 172 |
.LP |
| 173 |
.RS |
| 174 |
.nf |
| 175 |
.ne 6 |
| 176 |
.ta \w'newline 'u |
| 177 |
\f2char escape sequence\fP |
| 178 |
tab \f3\et\fP |
| 179 |
newline \f3\en\fP |
| 180 |
space \f3\e040 |
| 181 |
$ \e044 |
| 182 |
\e \e\e\fP |
| 183 |
.fi |
| 184 |
.RE |
| 185 |
.ds EY 1990, 1992, 1993 |
| 186 |
.SH IDENTIFICATION |
| 187 |
Author: Walter F. Tichy. |
| 188 |
.br |
| 189 |
Manual Page Revision: \*(Rv; Release Date: \*(Dt. |
| 190 |
.br |
| 191 |
Copyright \(co 2010-2022 Thien-Thi Nguyen. |
| 192 |
.br |
| 193 |
Copyright \(co \*(EY Paul Eggert. |
| 194 |
.br |
| 195 |
Copyright \(co 1982, 1988, 1989 Walter F. Tichy. |
| 196 |
.br |
| 197 |
.SH "SEE ALSO" |
| 198 |
.BR ci (1), |
| 199 |
.BR co (1), |
| 200 |
.BR rcs (1), |
| 201 |
.BR rcsdiff (1), |
| 202 |
.BR rcsmerge (1), |
| 203 |
.BR rlog (1), |
| 204 |
.BR rcsfile (5). |
| 205 |
.PP |
| 206 |
Walter F. Tichy, |
| 207 |
\*r\*-A System for Version Control, |
| 208 |
.I "Software\*-Practice & Experience" |
| 209 |
.BR 15 , |
| 210 |
7 (July 1985), 637-654. |
| 211 |
.PP |
| 212 |
The full documentation for \*r is maintained as a Texinfo manual. |
| 213 |
If the |
| 214 |
.BR info (1) |
| 215 |
and \*r programs are properly installed at your site, the command |
| 216 |
.IP |
| 217 |
.B info rcs |
| 218 |
.PP |
| 219 |
should give you access to the complete manual. |
| 220 |
Additionally, the \*r homepage: |
| 221 |
.IP |
| 222 |
.B http://www.gnu.org/software/rcs/ |
| 223 |
.PP |
| 224 |
has news and links to the latest release, development site, etc. |