|
|
The prs command is used to print all or part of an SCCS file on the standard output. If prs -d is used, the output will be in a format called data specification. Data specification is a string of SCCS file data keywords (not to be confused with get ID keywords) interspersed with optional user text.
Data keywords are replaced by appropriate values according to their definitions. For example,
:I:is defined as the data keyword replaced by the SID of a specified delta. Similarly, :F: is the data keyword for the SCCS filename currently being processed, and :C: is the comment line associated with a specified delta. All parts of an SCCS file have an associated data keyword. For a complete list, see the prs(CP) page.
There is no limit to the number of times a data keyword may appear in a data specification. Thus, for example,
$ prs -d":I: this is the top delta for :F: :I:" s.abcmay produce on the standard output
2.1 this is the top delta for s.abc 2.1
Information may be obtained from a single delta by specifying its SID using prs -r. For example,
$ prs -d":F:: :I: comment line is: :C:" -r1.4 s.abcmay produce the following output:
s.abc: 1.4 comment line is: THIS IS A COMMENT
If -r is not specified, the value of the SID defaults to the most recently created delta.
In addition, information from a range of deltas may be obtained with -l or -e. The use of prs -e substitutes data keywords for the SID designated with -r and all deltas created earlier, while prs -l substitutes data keywords for the SID designated with -r and all deltas created later. Thus, the command
$ prs -d:I: -r1.4 -e s.abcmay output
1.4 1.3 1.2.1.1 1.2 1.1
and the command
$ prs -d:I: -r1.4 -l s.abcmay produce
3.3 3.2 3.1 2.2.1.1 2.2 2.1 1.4
Substitution of data keywords for all deltas of the SCCS file may be obtained by specifying both -e and -l.