NAME [Toc] [Back]
prs - print and summarize an SCCS file
SYNOPSIS [Toc] [Back]
prs [-d dataspec] [-r[SID]] [-e] [-l] [-c cutoff] [-a] file ...
DESCRIPTION [Toc] [Back]
The prs command prints, on the standard output, parts or all of an
SCCS file (see sccsfile(4)) in a user-supplied format. If a directory
is named, prs behaves as though each file in the directory were
specified as a named file, except that non-SCCS files (last component
of the path name does not begin with s.), and unreadable files are
silently ignored. If a name of - is given, the standard input is
read; each line of the standard input is taken to be the name of an
SCCS file or directory to be processed; non-SCCS files and unreadable
files are silently ignored. A -- on the command line implies that all
following arguments are file/directory names.
Arguments to prs, which can appear in any order, consist of options
and file names.
Options [Toc] [Back]
All of the described options apply independently to each named file:
-d dataspec Used to specify the output data specification.
dataspec is a string consisting of SCCS file data
keywords (see Data Keywords below) interspersed
with optional user-supplied text.
-r[SID] Used to specify the SCCS IDentification (SID)
string of a delta for which information is
desired. If no SID is specified, the SID of the
most recently created delta is assumed. If an SID
is specified, it must agree exactly with an SID in
the file (that is, the SID structure used by get
does not work here - see get(1)).
-e Requests information for all deltas created
earlier than and including the delta designated
via the -r option or the date given by the -c
-l Requests information for all deltas created later
than and including the delta designated via the -r
option or the date given by the -c option.
-c cutoff Cutoff date-time, in the form
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
Units omitted from the date-time default to their
maximum possible values. Thus, -c7502 is
equivalent to -c750228235959. One or more nonnumeric
characters can be used to separate the
various 2-digit segments of the cutoff date (for
example -c77/2/2 9:22:25).
For 2-digit year input (YY), the following
interpretation is taken: [70-99, 00-69 (1970-1999,
-a Requests printing of information for both removed,
i.e., delta type = R, (see rmdel(1)) and existing,
that is, delta type = D, deltas. If the -a option
is not specified, information is provided for
existing deltas only.
If no option letters (or only -a) are given, prs prints the file name
using the default dataspec and the -e option. This produces
information on all deltas.
Data Keywords [Toc] [Back]
Data keywords specify which parts of an SCCS file are to be retrieved
and output. All parts of an SCCS file (see sccsfile(4)) have an
associated data keyword. There is no limit on the number of times a
data keyword can appear in a dataspec.
The information printed by prs consists of: (1) the user-supplied
text; and (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 is
either Simple (S), in which keyword substitution is direct, or Multi-
line (M), in which keyword substitution is followed by a carriage
User-supplied text is any text other than recognized data keywords.
Escapes can be used as follows:
backslash \\ form feed \f
backspace \b new-line \n
carriage-return \r single quote \'
colon \: tab \t
The default dataspec is:
SCCS File Data Keywords [Toc] [Back]
Keyword Data Item Section Value Fmt
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
:Dt: Delta information Delta Table See below* S
:DL: Delta line statistics " :Li:/:Ld:/:Lu: S
:Li: Lines inserted by Delta " nnnnn S
:Ld: Lines deleted by Delta " nnnnn S
:Lu: Lines unchanged by Delta " nnnnn S
:DT: Delta type " D or R S
:I: SCCS ID string (SID) " :R:.:L:.:B:.:S: S
:R: Release number " nnnn S
:L: Level number " nnnn S
:B: Branch number " nnnn S
:S: Sequence number " nnnn S
:D: Date Delta created " :Dy:/:Dm:/:Dd: S
:Dy: Year Delta created " nn S
:Dm: Month Delta created " nn S
:Dd: Day Delta created " nn S
:T: Time Delta created " :Th:::Tm:::Ts: S
:Th: Hour Delta created " nn S
:Tm: Minutes Delta created " nn S
:Ts: Seconds Delta created " nn S
:P: Programmer who created Delta " logname S
:DS: Delta sequence number " nnnn S
:DP: Predecessor Delta seq-no. " nnnn S
:DI: Seq # of deltas incl, excl, " :Dn:/:Dx:/:Dg: S
:Dn: Deltas included (seq #) " :DS: :DS:... S
:Dx: Deltas excluded (seq #) " :DS: :DS:... S
:Dg: Deltas ignored (seq #) " :DS: :DS:... S
:MR: MR numbers for delta " text M
:C: Comments for delta " text M
:UN: User names User name text M
:FL: Flag list Flags text M
:Y: Module type flag " text S
:MF: MR validation flag " yes or no S
:MP: MR validation pgm name " text S
:KF: Keyword error/warning flag " yes or no S
:KV: Keyword validation string " text S
:BF: Branch flag " yes or no S
:J: Joint edit flag " yes or no S
:LK: Locked releases " :R:... S
:Q: User defined keyword " text S
:M: Module name " text S
:FB: Floor boundary " :R: S
:CB: Ceiling boundary " :R: S
:Ds: Default SID " :I: S
:ND: Null delta flag " yes or no S
:FD: File descriptive text Comments text M
:BD: Body Body text M
:GB: Gotten body " text M
:W: A form of what(1) string N/A :Z::M:\t:I: S
:A: A form of what(1) string N/A :Z::Y: :M: :I::Z: S
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
:Z: what(1) string delimiter N/A @(#) S
:F: SCCS file name N/A text S
:PN: SCCS file path name N/A text S
* :Dt: = :DT: :I: :D: :T: :P: :DS: :DP:
If no option letters (or only -a) are given, prs prints the file name,
using the default dataspec, and the -e option; thus, information on
all deltas is produced.
EXTERNAL INFLUENCES [Toc] [Back]
LC_CTYPE determines the interpretation of dataspec as single- and/or
LC_MESSAGES determines the language in which messages are displayed.
If LC_CTYPE or LC_MESSAGES is not specified in the environment or is
set to the empty string, the value of LANG is used as a default for
each unspecified or empty variable. If LANG is not specified or is
set to the empty string, a default of "C" (see lang(5)) is used
instead of LANG. If any internationalization variable contains an
invalid setting, prs behaves as if all internationalization variables
are set to "C". See environ(5).
International Code Set Support [Toc] [Back]
Single-byte and multi-byte character code sets are supported.
DIAGNOSTICS [Toc] [Back]
Use sccshelp(1) for explanations.
EXAMPLES [Toc] [Back]
prs -d"Users and/or user IDs for :F: are :\n:UN:" s.file
may produce on the standard output:
Users and/or user IDs for s.file are:
prs -d"Newest delta for pgm :M:: :I: Created :D: By :P:" -r
may produce on the standard output:
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
Newest delta for pgm main.c: 3.7 Created 77/12/1 By cas
As a special case (when no specifications for selecting or printing
may produce on the standard output:
D 1.1 77/12/1 00:00:00 cas 1 000000/00000/00000
this is the comment line for s.file initial delta
for each delta table entry of the ``D'' type. The only option
argument allowed to be used with the special case is the -a option.
FILES [Toc] [Back]
SEE ALSO [Toc] [Back]
admin(1), delta(1), get(1), sccshelp(1), sccsfile(4).
STANDARDS CONFORMANCE [Toc] [Back]
prs: SVID2, SVID3, XPG2, XPG3, XPG4
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003 [ Back ]