IEEE/The Open Group
This manual page is part of the POSIX Programmer’s Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
prs — print an SCCS file (DEVELOPMENT)
prs [-a] [-d dataspec] [-r[SID]] file...
prs [-e|-l] -c cutoff [-d dataspec] file...
prs [-e|-l] -r[SID] [-d dataspec] file...
The prs utility shall write to standard output parts or all of an SCCS file in a user-supplied format.
The prs utility shall conform to the Base Definitions volume of POSIX.1-2008, Section 12.2, Utility Syntax Guidelines, except that the -r option has an optional option-argument. This optional option-argument cannot be presented as a separate argument. The following options shall be supported:
|-d dataspec||Specify the output data specification. The dataspec shall be a string consisting of SCCS file data keywords (see Data Keywords) interspersed with optional user-supplied text.|
|-r[SID]||Specify the SCCS identification string (SID) of a delta for which information is desired. If no SID option-argument is specified, the SID of the most recently created delta shall be assumed.|
|-e||Request information for all deltas created earlier than and including the delta designated via the -r option or the date-time given by the -c option.|
|-l||Request information for all deltas created later than and including the delta designated via the -r option or the date-time given by the -c option.|
|-c cutoff||Indicate the cutoff date-time, in the form:
For the YY component, values in the range [69,99] shall refer to years 1969 to 1999 inclusive, and values in the range [00,68] shall refer to years 2000 to 2068 inclusive.
No changes (deltas) to the SCCS file that were created after the specified cutoff date-time shall be included in the output. Units omitted from the date-time default to their maximum possible values; for example, -c 7502 is equivalent to -c 750228235959.
|-a||Request writing of information for both removed—that is, delta type= R (see rmdel)— and existing—that is, delta type= D,— deltas. If the -a option is not specified, information for existing deltas only shall be provided.|
The following operand shall be supported:
|file||A pathname of an existing SCCS file or a directory. If file is a directory, the prs utility shall behave as though each file in the directory were specified as a named file, except that non-SCCS files (last component of the pathname does not begin with s.) and unreadable files shall be silently ignored.
If exactly one file operand appears, and it is ’-’, the standard input shall be read; each line of the standard input shall be taken to be the name of an SCCS file to be processed. Non-SCCS files and unreadable files shall be silently ignored.
The standard input shall be a text file used only when the file operand is specified as ’-’. Each line of the text file shall be interpreted as an SCCS pathname.
Any SCCS files displayed are files of an unspecified format.
The following environment variables shall affect the execution of prs:
|LANG||Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1-2008, Section 8.2, Internationalization Variables the precedence of internationalization variables used to determine the values of locale categories.)|
|LC_ALL||If set to a non-empty string value, override the values of all the other internationalization variables.|
|LC_CTYPE||Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files).|
|LC_MESSAGES||Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.|
|NLSPATH||Determine the location of message catalogs for the processing of LC_MESSAGES.|
The standard output shall be a text file whose format is dependent on the data keywords specified with the -d option.
Data keywords specify which parts of an SCCS file shall be retrieved and output. All parts of an SCCS file have an associated data keyword. A data keyword may appear in a dataspec multiple times.
The information written by prs shall consist of:
|1.||The user-supplied text|
|2.||Appropriate values (extracted from the SCCS file) substituted for the recognized data keywords in the order of appearance in the dataspec|
|The format of a data keyword value shall either be simple ( ’S’), in which keyword substitution is direct, or multi-line ( ’M’).|
|User-supplied text shall be any text other than recognized data keywords. A <tab> shall be specified by ’\t’ and <newline> by ’\n’. When the -r option is not specified, the default dataspec shall be:|
|and the following dataspec shall be used for each selected delta:|
|*||:Dt:= :DT: :I: :D: :T: :P: :DS: :DP:|
|**||:R:.:L:.:B:.:S: if the delta is a branch delta ( :BF:== yes)
:R:.:L: if the delta is not a branch delta ( :BF:== no)
|***||The line statistics are capped at 99999. For example, if 100000 lines were unchanged in a certain revision, :Lu: shall produce the value 99999.|
The standard error shall be used only for diagnostic messages.
The following exit values shall be returned:
|>0||An error occurred.|
CONSEQUENCES OF ERRORS
The following sections are informative.
|1.||The following example:
might write to standard output:
|2.||The following example:
might write to standard output:
|3.||As a special case:
might write to standard output:
for each delta table entry of the D type. The only option allowed to be used with this special case is the -a option.
admin, delta, get, what
The Base Definitions volume of POSIX.1-2008, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .