PRS(1)                     POSIX Programmer's Manual                    PRS(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       prs -- print an SCCS file (DDEEVVEELLOOPPMMEENNTT)

SSYYNNOOPPSSIISS
       prs [[-a]] [[-d _d_a_t_a_s_p_e_c]] [[-r[[_S_I_D]]]] _f_i_l_e...

       prs [[-e|-l]] -c _c_u_t_o_f_f [[-d _d_a_t_a_s_p_e_c]] _f_i_l_e...

       prs [[-e|-l]] -r[[_S_I_D]] [[-d _d_a_t_a_s_p_e_c]] _f_i_l_e...

DDEESSCCRRIIPPTTIIOONN
       The _p_r_s utility shall write to standard output parts or all of an SCCS
       file in a user-supplied format.

OOPPTTIIOONNSS
       The _p_r_s utility shall conform to the Base Definitions volume of
       POSIX.1-2008, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s, except that the
       --rr option has an optional option-argument. This optional option-
       argument cannot be presented as a separate argument. The following
       options shall be supported:

       --dd _d_a_t_a_s_p_e_c
                 Specify the output data specification. The _d_a_t_a_s_p_e_c shall be
                 a string consisting of SCCS file _d_a_t_a _k_e_y_w_o_r_d_s (see _D_a_t_a
                 _K_e_y_w_o_r_d_s) interspersed with optional user-supplied text.

       --rr[[_S_I_D]]   Specify the SCCS identification string (SID) of a delta for
                 which information is desired. If no _S_I_D option-argument is
                 specified, the SID of the most recently created delta shall
                 be assumed.

       --ee        Request information for all deltas created earlier than and
                 including the delta designated via the --rr option or the date-
                 time given by the --cc option.

       --ll        Request information for all deltas created later than and
                 including the delta designated via the --rr option or the date-
                 time given by the --cc option.

       --cc _c_u_t_o_f_f Indicate the _c_u_t_o_f_f date-time, in the form:

                     _Y_Y[[_M_M[[_D_D[[_H_H[[_M_M[[_S_S]]]]]]]]]]

                 For the _Y_Y 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.

                 NNoottee::     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.)

                 No changes (deltas) to the SCCS file that were created after
                 the specified _c_u_t_o_f_f date-time shall be included in the
                 output. Units omitted from the date-time default to their
                 maximum possible values; for example, --cc 77550022 is equivalent
                 to --cc 775500222288223355995599.

       --aa        Request writing of information for both removed--that is,
                 _d_e_l_t_a _t_y_p_e=_R (see _r_m_d_e_l)--and existing--that is, _d_e_l_t_a
                 _t_y_p_e=_D,--deltas. If the --aa option is not specified,
                 information for existing deltas only shall be provided.

OOPPEERRAANNDDSS
       The following operand shall be supported:

       _f_i_l_e      A pathname of an existing SCCS file or a directory. If _f_i_l_e
                 is a directory, the _p_r_s 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 ss..)  and unreadable files shall be silently
                 ignored.

                 If exactly one _f_i_l_e 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.

SSTTDDIINN
       The standard input shall be a text file used only when the _f_i_l_e operand
       is specified as ''--''.  Each line of the text file shall be interpreted
       as an SCCS pathname.

IINNPPUUTT FFIILLEESS
       Any SCCS files displayed are files of an unspecified format.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _p_r_s:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2008, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s the precedence of internationalization variables
                 used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  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).

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       The standard output shall be a text file whose format is dependent on
       the data keywords specified with the --dd option.

   DDaattaa KKeeyywwoorrddss
       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 _d_a_t_a_s_p_e_c multiple times.

       The information written by _p_r_s 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
           _d_a_t_a_s_p_e_c

       The format of a data keyword value shall either be simple (''SS''), in
       which keyword substitution is direct, or multi-line (''MM'').

       User-supplied text shall be any text other than recognized data
       keywords. A <tab> shall be specified by ''\\tt'' and <newline> by ''\\nn''.
       When the --rr option is not specified, the default _d_a_t_a_s_p_e_c shall be:

           ::PPNN::::\\nn\\nn

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

           ::DDtt::\\tt::DDLL::\\nnMMRRss::\\nn::MMRR::CCOOMMMMEENNTTSS::\\nn::CC::

+-------------------------------------------------------------------------------------+
|                              SSCCCCSS FFiillee DDaattaa KKeeyywwoorrddss                                |
+--------+--------------------------------+--------------+-------------------+--------+
|KKeeyywwoorrdd |           DDaattaa IItteemm            | FFiillee SSeeccttiioonn |       VVaalluuee       | FFoorrmmaatt |
+--------+--------------------------------+--------------+-------------------+--------+
|::DDtt::    | Delta information              | Delta Table  | See below*        |   S    |
|::DDLL::    | Delta line statistics          |      "       | ::LLii:://::LLdd:://::LLuu::    |   S    |
|::LLii::    | Lines inserted by Delta        |      "       | _n_n_n_n_n***          |   S    |
|::LLdd::    | Lines deleted by Delta         |      "       | _n_n_n_n_n***          |   S    |
|::LLuu::    | Lines unchanged by Delta       |      "       | _n_n_n_n_n***          |   S    |
|::DDTT::    | Delta type                     |      "       | DD oorr RR            |   S    |
|::II::     | SCCS ID string (SID)           |      "       | See below**       |   S    |
|::RR::     | Release number                 |      "       | _n_n_n_n              |   S    |
|::LL::     | Level number                   |      "       | _n_n_n_n              |   S    |
|::BB::     | Branch number                  |      "       | _n_n_n_n              |   S    |
|::SS::     | Sequence number                |      "       | _n_n_n_n              |   S    |
|::DD::     | Date delta created             |      "       | ::DDyy:://::DDmm:://::DDdd::    |   S    |
|::DDyy::    | Year delta created             |      "       | _n_n                |   S    |
|::DDmm::    | Month delta created            |      "       | _n_n                |   S    |
|::DDdd::    | Day delta created              |      "       | _n_n                |   S    |
|::TT::     | Time delta created             |      "       | ::TThh::::::TTmm::::::TTss::    |   S    |
|::TThh::    | Hour delta created             |      "       | _n_n                |   S    |
|::TTmm::    | Minutes delta created          |      "       | _n_n                |   S    |
|::TTss::    | Seconds delta created          |      "       | _n_n                |   S    |
|::PP::     | Programmer who created Delta   |      "       | _l_o_g_n_a_m_e           |   S    |
|::DDSS::    | Delta sequence number          |      "       | _n_n_n_n              |   S    |
|::DDPP::    | Predecessor Delta sequence     |      "       | _n_n_n_n              |   S    |
|        | number                         |              |                   |        |
|::DDII::    | Sequence number of deltas      |      "       | ::DDnn:://::DDxx:://::DDgg::    |   S    |
|        | included, excluded, or ignored |              |                   |        |
|::DDnn::    | Deltas included (sequence #)   |      "       | ::DDSS:: ::DDSS:: ......     |   S    |
|::DDxx::    | Deltas excluded (sequence #)   |      "       | ::DDSS:: ::DDSS:: ......     |   S    |
|::DDgg::    | Deltas ignored (sequence #)    |      "       | ::DDSS:: ::DDSS:: ......     |   S    |
|::MMRR::    | MR numbers for delta           |      "       | _t_e_x_t              |   M    |
|::CC::     | Comments for delta             |      "       | _t_e_x_t              |   M    |
|::UUNN::    | User names                     |  User Names  | _t_e_x_t              |   M    |
|::FFLL::    | Flag list                      |    Flags     | _t_e_x_t              |   M    |
|::YY::     | Module type flag               |      "       | _t_e_x_t              |   S    |
|::MMFF::    | MR validation flag             |      "       | yyeess or nnoo         |   S    |
|::MMPP::    | MR validation program name     |      "       | _t_e_x_t              |   S    |
|::KKFF::    | Keyword error, warning flag    |      "       | yyeess or nnoo         |   S    |
|::KKVV::    | Keyword validation string      |      "       | _t_e_x_t              |   S    |
|::BBFF::    | Branch flag                    |      "       | yyeess or nnoo         |   S    |
|::JJ::     | Joint edit flag                |      "       | yyeess or nnoo         |   S    |
|::LLKK::    | Locked releases                |      "       | ::RR:: ......           |   S    |
|::QQ::     | User-defined keyword           |      "       | _t_e_x_t              |   S    |
|::MM::     | Module name                    |      "       | _t_e_x_t              |   S    |
|::FFBB::    | Floor boundary                 |      "       | ::RR::               |   S    |
|::CCBB::    | Ceiling boundary               |      "       | ::RR::               |   S    |
|::DDss::    | Default SID                    |      "       | ::II::               |   S    |
|::NNDD::    | Null delta flag                |      "       | yyeess or nnoo         |   S    |
|::FFDD::    | File descriptive text          |   Comments   | _t_e_x_t              |   M    |
|::BBDD::    | Body                           |     Body     | _t_e_x_t              |   M    |
|::GGBB::    | Gotten body                    |      "       | _t_e_x_t              |   M    |
|::WW::     | A form of _w_h_a_t string          |     N/A      | ::ZZ::::MM::\\tt::II::       |   S    |
|::AA::     | A form of _w_h_a_t string          |     N/A      | ::ZZ::::YY:: ::MM:: ::II::::ZZ:: |   S    |
|::ZZ::     | _w_h_a_t string delimiter          |     N/A      | @(#)              |   S    |
|::FF::     | SCCS filename                  |     N/A      | _t_e_x_t              |   S    |
|::PPNN::    | SCCS file pathname             |     N/A      | _t_e_x_t              |   S    |
+--------+--------------------------------+--------------+-------------------+--------+
       *     ::DDtt::=::DDTT:: ::II:: ::DD:: ::TT:: ::PP:: ::DDSS:: ::DDPP::

       **    ::RR::..::LL::..::BB::..::SS:: if the delta is a branch delta (::BBFF::==yyeess)
             ::RR::..::LL:: if the delta is not a branch delta (::BBFF::==nnoo)

       ***   The line statistics are capped at 99999. For example, if 100000
             lines were unchanged in a certain revision, ::LLuu:: shall produce
             the value 99999.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

EEXXAAMMPPLLEESS
        1. The following example:

               pprrss --dd ""UUsseerr NNaammeess ffoorr ::FF:: aarree::\\nn::UUNN::"" ss..ffiillee

           might write to standard output:

               UUsseerr NNaammeess ffoorr ss..ffiillee aarree::
               xxyyzz
               113311
               aabbcc

        2. The following example:

               pprrss --dd ""DDeellttaa ffoorr ppggmm ::MM:::: ::II:: -- ::DD:: BByy ::PP::"" --rr ss..ffiillee

           might write to standard output:

               DDeellttaa ffoorr ppggmm mmaaiinn..cc:: 33..77 -- 7777//1122//0011 BByy ccaass

        3. As a special case:

               pprrss ss..ffiillee

           might write to standard output:

               ss..ffiillee::
               <<_b_l_a_n_k _l_i_n_e>>
               DD 11..11 7777//1122//0011 0000::0000::0000 ccaass 11 000000000000//0000000000//0000000000
               MMRRss::
               bbll7788--1122334455
               bbll7799--5544332211
               CCOOMMMMEENNTTSS::
               tthhiiss iiss tthhee ccoommmmeenntt lliinnee ffoorr ss..ffiillee iinniittiiaall ddeellttaa
               <<_b_l_a_n_k _l_i_n_e>>

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

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _a_d_m_i_n, _d_e_l_t_a, _g_e_t, _w_h_a_t

       The Base Definitions volume of POSIX.1-2008, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s

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



IEEE/The Open Group                  2013                               PRS(1)
