PRS(1POSIX)

โœจ PROLOG โœจ

Welcome to PRS(1POSIX) โ€” the POSIX Programmer's Manual page for prs, bestie! ๐Ÿ’– 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. No cap, check your local docs. ๐Ÿซถ

๐ŸŒธ NAME ๐ŸŒธ

prs โ€” print an SCCS file (DEVELOPMENT)

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

prs [-a] [-d dataspec] [-r[SID]] file...

prs [-e|-l] -c cutoff [-d dataspec] file...

prs [-e|-l] -r[SID] [-d dataspec] file...

โœจ DESCRIPTION โœจ

The prs utility shall write to standard output parts or all of an SCCS file in a user-supplied format. Slay. โœจ

๐Ÿ’… OPTIONS ๐Ÿ’…

The prs utility shall conform to the Base Definitions volume of POSIX.1-2017, 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:
YY[MM[DD[HH[MM[SS]]]]]

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.

Note: It is expected that in a future version of this standard the default century inferred from a 2-digit year will change. (This would apply to all commands accepting a 2-digit year as input.) iykyk ๐Ÿ•ฐ๏ธ

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. periodt.

  • -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. ๐Ÿ‘‘

๐ŸŽ€ OPERANDS ๐ŸŽ€

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. ๐Ÿ’€

๐Ÿ“ STDIN ๐Ÿ“

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. ๐Ÿ“ฅ

๐ŸŒˆ INPUT FILES ๐ŸŒˆ

Any SCCS files displayed are files of an unspecified format. mysterious much? ๐Ÿงš

๐Ÿ’œ ENVIRONMENT VARIABLES ๐Ÿ’œ

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-2017, 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. ๐Ÿ“š

โณ ASYNCHRONOUS EVENTS โณ

Default. no drama. โœจ

๐Ÿ”ฅ STDOUT ๐Ÿ”ฅ

The standard output shall be a text file whose format is dependent on the data keywords specified with the -d option. ๐Ÿ“ค

๐Ÿ’– Data Keywords ๐Ÿ’–

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:

:PN::\n\n

and the following dataspec shall be used for each selected delta:

:Dt:\t:DL:\nMRs:\n:MR:COMMENTS:\n:C:

๐Ÿ‘‘ SCCS File Data Keywords ๐Ÿ‘‘

The table headings are: Keyword, Data Item, File Section, Value, Format.

okay so picking up exactly where we left off in the keyword table โ€” no skips, no cap, every single one is here:

  • :Dt: โ€” Delta information โ€” delta table: Delta Table โ€” value: See below* โ€” S
  • :DL: โ€” Delta line statistics โ€” delta table: " โ€” value: :Li:/:Ld:/:Lu: โ€” S
  • :Li: โ€” Lines inserted by Delta โ€” delta table: " โ€” value: nnnnn*** โ€” S
  • :Ld: โ€” Lines deleted by Delta โ€” delta table: " โ€” value: nnnnn*** โ€” S
  • :Lu: โ€” Lines unchanged by Delta โ€” delta table: " โ€” value: nnnnn*** โ€” S
  • :DT: โ€” Delta type โ€” delta table: " โ€” value: D or R โ€” S
  • :I: โ€” SCCS ID string (SID) โ€” delta table: " โ€” value: See below** โ€” S
  • :R: โ€” Release number โ€” delta table: " โ€” value: nnnn โ€” S
  • :L: โ€” Level number โ€” delta table: " โ€” value: nnnn โ€” S
  • :B: โ€” Branch number โ€” delta table: " โ€” value: nnnn โ€” S
  • :S: โ€” Sequence number โ€” delta table: " โ€” value: nnnn โ€” S
  • :D: โ€” Date delta created โ€” delta table: " โ€” value: :Dy:/:Dm:/:Dd: โ€” S
  • :Dy: โ€” Year delta created โ€” delta table: " โ€” value: nn โ€” S
  • :Dm: โ€” Month delta created โ€” delta table: " โ€” value: nn โ€” S
  • :Dd: โ€” Day delta created โ€” delta table: " โ€” value: nn โ€” S
  • :T: โ€” Time delta created โ€” delta table: " โ€” value: :Th:::Tm:::Ts: โ€” S
  • :Th: โ€” Hour delta created โ€” delta table: " โ€” value: nn โ€” S
  • :Tm: โ€” Minutes delta created โ€” delta table: " โ€” value: nn โ€” S
  • :Ts: โ€” Seconds delta created โ€” delta table: " โ€” value: nn โ€” S
  • :P: โ€” Programmer who created Delta โ€” delta table: " โ€” value: logname โ€” S
  • :DS: โ€” Delta sequence number โ€” delta table: " โ€” value: nnnn โ€” S
  • :DP: โ€” Predecessor Delta sequence number โ€” delta table: " โ€” value: nnnn โ€” S
  • :DI: โ€” Sequence number of deltas included, excluded, or ignored โ€” delta table: " โ€” value: :Dn:/:Dx:/:Dg: โ€” S
  • :Dn: โ€” Deltas included (sequence #) โ€” delta table: " โ€” value: :DS: :DS: ... โ€” S
  • :Dx: โ€” Deltas excluded (sequence #) โ€” delta table: " โ€” value: :DS: :DS: ... โ€” S
  • :Dg: โ€” Deltas ignored (sequence #) โ€” delta table: " โ€” value: :DS: :DS: ... โ€” S
  • :MR: โ€” MR numbers for delta โ€” delta table: " โ€” value: text โ€” M
  • :C: โ€” Comments for delta โ€” delta table: " โ€” value: text โ€” M
  • :UN: โ€” User names โ€” delta table: User Names โ€” value: text โ€” M
  • :FL: โ€” Flag list โ€” delta table: Flags โ€” value: text โ€” M
  • :Y: โ€” Module type flag โ€” delta table: " โ€” value: text โ€” S
  • :MF: โ€” MR validation flag โ€” delta table: " โ€” value: yes or no โ€” S
  • :MP: โ€” MR validation program name โ€” delta table: " โ€” value: text โ€” S
  • :KF: โ€” Keyword error, warning flag โ€” delta table: " โ€” value: yes or no โ€” S
  • :KV: โ€” Keyword validation string โ€” delta table: " โ€” value: text โ€” S
  • :BF: โ€” Branch flag โ€” delta table: " โ€” value: yes or no โ€” S
  • :J: โ€” Joint edit flag โ€” delta table: " โ€” value: yes or no โ€” S
  • :LK: โ€” Locked releases โ€” delta table: " โ€” value: :R: ... โ€” S
  • :Q: โ€” User-defined keyword โ€” delta table: " โ€” value: text โ€” S
  • :M: โ€” Module name โ€” delta table: " โ€” value: text โ€” S
  • :FB: โ€” Floor boundary โ€” delta table: " โ€” value: :R: โ€” S
  • :CB: โ€” Ceiling boundary โ€” delta table: " โ€” value: :R: โ€” S
  • :Ds: โ€” Default SID โ€” delta table: " โ€” value: :I: โ€” S
  • :ND: โ€” Null delta flag โ€” delta table: " โ€” value: yes or no โ€” S
  • :FD: โ€” File descriptive text โ€” delta table: Comments โ€” value: text โ€” M
  • :BD: โ€” Body โ€” delta table: Body โ€” value: text โ€” M
  • :GB: โ€” Gotten body โ€” delta table: " โ€” value: text โ€” M
  • :W: โ€” A form of what string โ€” delta table: N/A โ€” value: :Z::M:\t:I: โ€” S
  • :A: โ€” A form of what string โ€” delta table: N/A โ€” value: :Z::Y: :M: :I::Z: โ€” S
  • :Z: โ€” what string delimiter โ€” delta table: N/A โ€” value: @(#) โ€” S
  • :F: โ€” SCCS filename โ€” delta table: N/A โ€” value: text โ€” S
  • :PN: โ€” SCCS file pathname โ€” delta table: N/A โ€” value: text โ€” S

and here's the footnote tea โ˜• because those little stars matter:

  • * โ€” :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.

โœจ STDERR โœจ

The standard error shall be used only for diagnostic messages.

๐Ÿ—‚๏ธ OUTPUT FILES ๐Ÿ—‚๏ธ

None.

๐Ÿงš EXTENDED DESCRIPTION ๐Ÿงš

None.

๐Ÿ’€ EXIT STATUS ๐Ÿ’€

The following exit values shall be returned:

  • 0 โ€” Successful completion.
  • >0 โ€” An error occurred.

๐ŸŒ€ CONSEQUENCES OF ERRORS ๐ŸŒ€

Default.

The following sections are informative.

๐ŸŒธ APPLICATION USAGE ๐ŸŒธ

None.

โœจ EXAMPLES โœจ

  1. The following example:
prs -d "User Names for :F: are:\n:UN:" s.file

might write to standard output:

User Names for s.file are:
xyz
131
abc
  1. The following example:
prs -d "Delta for pgm :M:: :I: - :D: By :P:" -r s.file

might write to standard output:

Delta for pgm main.c: 3.7 - 77/12/01 By cas
  1. As a special case:
prs s.file

might write to standard output:

s.file:
<blank line>
D 1.1 77/12/01 00:00:00 cas 1 000000/00000/00000
MRs:
bl78-12345
bl79-54321
COMMENTS:
this is the comment line for s.file initial delta
<blank line>

for each delta table entry of the D type. The only option allowed to be used with this special case is the -a option.

๐Ÿง  RATIONALE ๐Ÿง 

None.

๐Ÿ”ฎ FUTURE DIRECTIONS ๐Ÿ”ฎ

None.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

admin, delta, get, what

The Base Definitions volume of POSIX.1โ€2017, 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-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. 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.opengroup.org/unix/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 .


and that's the whole entire vibe, bestie! this page is brought to you by IEEE/The Open Group, 2017 โ€” it's the PRS(1POSIX) manual page, and you absolutely ate by reading all of it ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from