GET(1)                     POSIX Programmer's Manual                    GET(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
       get -- get a version of an SCCS file (DDEEVVEELLOOPPMMEENNTT)

SSYYNNOOPPSSIISS
       get [[-begkmnlLpst]] [[-c _c_u_t_o_f_f]] [[-i _l_i_s_t]] [[-r _S_I_D]] [[-x _l_i_s_t]] _f_i_l_e...

DDEESSCCRRIIPPTTIIOONN
       The _g_e_t utility shall generate a text file from each named SCCS _f_i_l_e
       according to the specifications given by its options.

       The generated text shall normally be written into a file called the gg--
       ffiillee whose name is derived from the SCCS filename by simply removing
       the leading ""ss.."".

OOPPTTIIOONNSS
       The _g_e_t utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _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.

       The following options shall be supported:

       --rr _S_I_D    Indicate the SCCS Identification String (SID) of the version
                 (delta) of an SCCS file to be retrieved. The table shows, for
                 the most useful cases, what version of an SCCS file is
                 retrieved (as well as the SID of the version to be eventually
                 created by _d_e_l_t_a if the --ee option is also used), as a
                 function of the SID specified.

       --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
                 generated text file. Units omitted from the date-time default
                 to their maximum possible values; for example, --cc 7502 is
                 equivalent to --cc 750228235959.

                 Any number of non-numeric characters may separate the various
                 2-digit pieces of the _c_u_t_o_f_f date-time. This feature allows
                 the user to specify a _c_u_t_o_f_f date in the form: --cc
                 "77/2/2 9:22:25".

       --ee        Indicate that the _g_e_t is for the purpose of editing or making
                 a change (delta) to the SCCS file via a subsequent use of
                 _d_e_l_t_a.  The --ee option used in a _g_e_t for a particular version
                 (SID) of the SCCS file shall prevent further _g_e_t commands
                 from editing on the same SID until _d_e_l_t_a is executed or the jj
                 (joint edit) flag is set in the SCCS file. Concurrent use of
                 _g_e_t --ee for different SIDs is always allowed.

                 If the gg--ffiillee generated by _g_e_t with a --ee option is
                 accidentally ruined in the process of editing, it may be
                 regenerated by re-executing the _g_e_t command with the --kk
                 option in place of the --ee option.

                 SCCS file protection specified via the ceiling, floor, and
                 authorized user list stored in the SCCS file shall be
                 enforced when the --ee option is used.

       --bb        Use with the --ee option to indicate that the new delta should
                 have an SID in a new branch as shown in the table below. This
                 option shall be ignored if the bb flag is not present in the
                 file or if the retrieved delta is not a leaf delta. (A leaf
                 delta is one that has no successors on the SCCS file tree.)

                 NNoottee::     A branch delta may always be created from a non-
                           leaf delta.

       --ii _l_i_s_t   Indicate a _l_i_s_t of deltas to be included (forced to be
                 applied) in the creation of the generated file. The _l_i_s_t has
                 the following syntax:


                     <list> ::= <range> | <list> , <range>
                     <range> ::= SID | SID - SID

                 SID, the SCCS Identification of a delta, may be in any form
                 shown in the ``SID Specified'' column of the table in the
                 EXTENDED DESCRIPTION section, except that the result of
                 supplying a partial SID is unspecified. A diagnostic message
                 shall be written if the first SID in the range is not an
                 ancestor of the second SID in the range.

       --xx _l_i_s_t   Indicate a _l_i_s_t of deltas to be excluded (forced not to be
                 applied) in the creation of the generated file. See the --ii
                 option for the _l_i_s_t format.

       --kk        Suppress replacement of identification keywords (see below)
                 in the retrieved text by their value. The --kk option shall be
                 implied by the --ee option.

       --ll        Write a delta summary into an ll--ffiillee.

       --LL        Write a delta summary to standard output. All informative
                 output that normally is written to standard output shall be
                 written to standard error instead, unless the --ss option is
                 used, in which case it shall be suppressed.

       --pp        Write the text retrieved from the SCCS file to the standard
                 output. No gg--ffiillee shall be created. All informative output
                 that normally goes to the standard output shall go to
                 standard error instead, unless the --ss option is used, in
                 which case it shall disappear.

       --ss        Suppress all informative output normally written to standard
                 output.  However, fatal error messages (which shall always be
                 written to the standard error) shall remain unaffected.

       --mm        Precede each text line retrieved from the SCCS file by the
                 SID of the delta that inserted the text line in the SCCS
                 file. The format shall be:


                     "%s\t%s", <_S_I_D>, <_t_e_x_t _l_i_n_e>

       --nn        Precede each generated text line with the %MM% identification
                 keyword value (see below). The format shall be:


                     "%s\t%s", <_%_M_% _v_a_l_u_e>, <_t_e_x_t _l_i_n_e>

                 When both the --mm and --nn options are used, the <_t_e_x_t _l_i_n_e>
                 shall be replaced by the --mm option-generated format.

       --gg        Suppress the actual retrieval of text from the SCCS file. It
                 is primarily used to generate an ll--ffiillee, or to verify the
                 existence of a particular SID.

       --tt        Use to access the most recently created (top) delta in a
                 given release (for example, --rr 11), or release and level (for
                 example, --rr 11..22).

OOPPEERRAANNDDSS
       The following operands 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 _g_e_t 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
                 is 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 if the _f_i_l_e operand
       is specified as ''--''.  Each line of the text file shall be interpreted
       as an SCCS pathname.

IINNPPUUTT FFIILLEESS
       The SCCS files shall be files of an unspecified format.

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

       _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-2017, _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 for 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, and informative messages written to standard output
                 (or standard error, if the --pp option is used).

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

       _T_Z        Determine the timezone in which the times and dates written
                 in the SCCS file are evaluated. If the _T_Z variable is unset
                 or NULL, an unspecified system default timezone is used.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       For each file processed, _g_e_t shall write to standard output the SID
       being accessed and the number of lines retrieved from the SCCS file, in
       the following format:


           "%s\n%d lines\n", <_S_I_D>, <_n_u_m_b_e_r _o_f _l_i_n_e_s>

       If the --ee option is used, the SID of the delta to be made shall appear
       after the SID accessed and before the number of lines generated, in the
       POSIX locale:


           "%s\nnew delta %s\n%d lines\n", <_S_I_D _a_c_c_e_s_s_e_d>,
               <_S_I_D _t_o _b_e _m_a_d_e>, <_n_u_m_b_e_r _o_f _l_i_n_e_s>

       If there is more than one named file or if a directory or standard
       input is named, each pathname shall be written before each of the lines
       shown in one of the preceding formats:


           "\n%s:\n", <_p_a_t_h_n_a_m_e>

       If the --LL option is used, a delta summary shall be written following
       the format specified below for ll--ffiilleess.

       If the --ii option is used, included deltas shall be listed following the
       notation, in the POSIX locale:


           "Included:\n"

       If the --xx option is used, excluded deltas shall be listed following the
       notation, in the POSIX locale:


           "Excluded:\n"

       If the --pp or --LL options are specified, the standard output shall
       consist of the text retrieved from the SCCS file.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages, except
       if the --pp or --LL options are specified, it shall include all informative
       messages normally sent to standard output.

OOUUTTPPUUTT FFIILLEESS
       Several auxiliary files may be created by _g_e_t.  These files are known
       generically as the gg--ffiillee, ll--ffiillee, pp--ffiillee, and zz--ffiillee.  The letter
       before the <hyphen-minus> is called the _t_a_g.  An auxiliary filename
       shall be formed from the SCCS filename: the application shall ensure
       that the last component of all SCCS filenames is of the form ss.._m_o_d_u_l_e_-
       _n_a_m_e; the auxiliary files shall be named by replacing the leading ss
       with the tag. The gg--ffiillee shall be an exception to this scheme: the gg--
       ffiillee is named by removing the ss..  prefix. For example, for ss..xxyyzz..cc, the
       auxiliary filenames would be xxyyzz..cc, ll..xxyyzz..cc, pp..xxyyzz..cc, and zz..xxyyzz..cc,
       respectively.

       The gg--ffiillee, which contains the generated text, shall be created in the
       current directory (unless the --pp option is used). A gg--ffiillee shall be
       created in all cases, whether or not any lines of text were generated
       by the _g_e_t.  It shall be owned by the real user. If the --kk option is
       used or implied, the gg--ffiillee shall be writable by the owner only (read-
       only for everyone else); otherwise, it shall be read-only. Only the
       real user need have write permission in the current directory.

       The ll--ffiillee shall contain a table showing which deltas were applied in
       generating the retrieved text. The ll--ffiillee shall be created in the
       current directory if the --ll option is used; it shall be read-only and
       it is owned by the real user.  Only the real user need have write
       permission in the current directory.

       Lines in the ll--ffiillee shall have the following format:


           "%c%c%c %s\t%s %s\n", <_c_o_d_e_1>, <_c_o_d_e_2>, <_c_o_d_e_3>,
               <_S_I_D>, <_d_a_t_e_-_t_i_m_e>, <_l_o_g_i_n>

       where the entries are:

       <_c_o_d_e_1>   A <space> if the delta was applied; ''**'' otherwise.

       <_c_o_d_e_2>   A <space> if the delta was applied or was not applied and
                 ignored; ''**'' if the delta was not applied and was not
                 ignored.

       <_c_o_d_e_3>   A character indicating a special reason why the delta was or
                 was not applied:

                 II     Included.

                 XX     Excluded.

                 CC     Cut off (by a --cc option).

       <_d_a_t_e_-_t_i_m_e>
                 Date and time (using the format of the _d_a_t_e utility's
                 %%yy/%%mm/%%dd %%TT conversion specification format) of creation.

       <_l_o_g_i_n>   Login name of person who created _d_e_l_t_a.

       The comments and MR data shall follow on subsequent lines, indented one
       <tab>.  A blank line shall terminate each entry.

       The pp--ffiillee shall be used to pass information resulting from a _g_e_t with
       a --ee option along to _d_e_l_t_a.  Its contents shall also be used to prevent
       a subsequent execution of _g_e_t with a --ee option for the same SID until
       _d_e_l_t_a is executed or the joint edit flag, jj, is set in the SCCS file.
       The pp--ffiillee shall be created in the directory containing the SCCS file
       and the application shall ensure that the effective user has write
       permission in that directory. It shall be writable by owner only, and
       owned by the effective user. Each line in the pp--ffiillee shall have the
       following format:


           "%s %s %s %s%s%s\n", <_g_-_f_i_l_e _S_I_D>,
               <_S_I_D _o_f _n_e_w _d_e_l_t_a>, <_l_o_g_i_n_-_n_a_m_e _o_f _r_e_a_l _u_s_e_r>,
               <_d_a_t_e_-_t_i_m_e>, <_i_-_v_a_l_u_e>, <_x_-_v_a_l_u_e>

       where <_i_-_v_a_l_u_e> uses the format """" if no --ii option was specified, and
       shall use the format:


           " -i%s", <-i option _o_p_t_i_o_n_-_a_r_g_u_m_e_n_t>

       if a --ii option was specified and <_x_-_v_a_l_u_e> uses the format """" if no --xx
       option was specified, and shall use the format:


           " -x%s", <-x option _o_p_t_i_o_n_-_a_r_g_u_m_e_n_t>

       if a --xx option was specified. There can be an arbitrary number of lines
       in the pp--ffiillee at any time; no two lines shall have the same new delta
       SID.

       The zz--ffiillee shall serve as a lock-out mechanism against simultaneous
       updates. Its contents shall be the binary process ID of the command
       (that is, _g_e_t) that created it. The zz--ffiillee shall be created in the
       directory containing the SCCS file for the duration of _g_e_t.  The same
       protection restrictions as those for the pp--ffiillee shall apply for the zz--
       ffiillee.  The zz--ffiillee shall be created read-only.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
    +----------------------------------------------------------------------------+
    |                DDeetteerrmmiinnaattiioonn ooff SSCCCCSS IIddeennttiiffiiccaattiioonn SSttrriinngg                 |
    +----------------------------------------------------------------------------+
    |  SSIIDD**      --bb KKeeyylleetttteerr          OOtthheerr             SSIIDD       SSIIDD ooff DDeellttaa  |
    |SSppeecciiffiieedd     UUsseedd<<**>>          CCoonnddiittiioonnss        RReettrriieevveedd   ttoo bbee CCrreeaatteedd  |
    +----------------------------------------------------------------------------+
    |none<**>         no        R defaults to mR      mR.mL       mR.(mL+1)      |
    +----------------------------------------------------------------------------+
    |none<**>        yes        R defaults to mR      mR.mL       mR.mL.(mB+1).1 |
    +----------------------------------------------------------------------------+
    |R                no        R > mR                mR.mL       R.1***         |
    +----------------------------------------------------------------------------+
    |R                no        R = mR                mR.mL       mR.(mL+1)      |
    +----------------------------------------------------------------------------+
    |R               yes        R > mR                mR.mL       mR.mL.(mB+1).1 |
    +----------------------------------------------------------------------------+
    |R               yes        R = mR                mR.mL       mR.mL.(mB+1).1 |
    +----------------------------------------------------------------------------+
    |R                -         R < mR and R does     hR.mL**     hR.mL.(mB+1).1 |
    |                           not exist                                        |
    +----------------------------------------------------------------------------+
    |R                -         Trunk successor in    R.mL        R.mL.(mB+1).1  |
    |                           release > R and R                                |
    |                           exists                                           |
    +----------------------------------------------------------------------------+
    |R.L              no        No trunk successor    R.L         R.(L+1)        |
    +----------------------------------------------------------------------------+
    |R.L             yes        No trunk successor    R.L         R.L.(mB+1).1   |
    +----------------------------------------------------------------------------+
    |R.L              -         Trunk successor in    R.L         R.L.(mB+1).1   |
    |                           release >= R                                     |
    +----------------------------------------------------------------------------+
    |R.L.B            no        No branch successor   R.L.B.mS    R.L.B.(mS+1)   |
    +----------------------------------------------------------------------------+
    |R.L.B           yes        No branch successor   R.L.B.mS    R.L.(mB+1).1   |
    +----------------------------------------------------------------------------+
    |R.L.B.S          no        No branch successor   R.L.B.S     R.L.B.(S+1)    |
    +----------------------------------------------------------------------------+
    |R.L.B.S         yes        No branch successor   R.L.B.S     R.L.(mB+1).1   |
    +----------------------------------------------------------------------------+
    |R.L.B.S          -         Branch successor      R.L.B.S     R.L.(mB+1).1   |
    +----------------------------------------------------------------------------+
       *       R, L, B, and S are the release, level, branch, and sequence
               components of the SID, respectively; m means maximum. Thus, for
               example, R.mL means ``the maximum level number within release
               R''; R.L.(mB+1).1 means ``the first sequence number on the new
               branch (that is, maximum branch number plus one) of level L
               within release R''. Note that if the SID specified is of the
               form R.L, R.L.B, or R.L.B.S, each of the specified components
               shall exist.

       **      hR is the highest existing release that is lower than the
               specified, nonexistent, release R.

       ***     This is used to force creation of the first delta in a new
               release.

       <*>     The --bb option is effective only if the bb flag is present in the
               file. An entry of ''--'' means ``irrelevant''.

       <**>    This case applies if the dd (default SID) flag is not present in
               the file. If the dd flag is present in the file, then the SID
               obtained from the dd flag is interpreted as if it had been
               specified on the command line.  Thus, one of the other cases in
               this table applies.

   SSyysstteemm DDaattee aanndd TTiimmee
       When a gg--ffiillee is generated, the creation time of deltas in the SCCS
       file may be taken into account. If any of these times are apparently in
       the future, the behavior is unspecified.

   IIddeennttiiffiiccaattiioonn KKeeyywwoorrddss
       Identifying information shall be inserted into the text retrieved from
       the SCCS file by replacing identification keywords with their value
       wherever they occur. The following keywords may be used in the text
       stored in an SCCS file:

       %MM%       Module name: either the value of the mm flag in the file, or
                 if absent, the name of the SCCS file with the leading ss..
                 removed.

       %II%       SCCS identification (SID) (%RR%.%LL% or %RR%.%LL%.%BB%.%SS%) of the
                 retrieved text.

       %RR%       Release.

       %LL%       Level.

       %BB%       Branch.

       %SS%       Sequence.

       %DD%       Current date (_Y_Y/_M_M/_D_D).

       %HH%       Current date (_M_M/_D_D/_Y_Y).

       %TT%       Current time (_H_H:_M_M:_S_S).

       %EE%       Date newest applied delta was created (_Y_Y/_M_M/_D_D).

       %GG%       Date newest applied delta was created (_M_M/_D_D/_Y_Y).

       %UU%       Time newest applied delta was created (_H_H:_M_M:_S_S).

       %YY%       Module type: value of the tt flag in the SCCS file.

       %FF%       SCCS filename.

       %PP%       SCCS absolute pathname.

       %QQ%       The value of the qq flag in the file.

       %CC%       Current line number. This keyword is intended for identifying
                 messages output by the program, such as ``this should not
                 have happened'' type errors. It is not intended to be used on
                 every line to provide sequence numbers.

       %ZZ%       The four-character string ""@@((##))"" recognizable by _w_h_a_t.

       %WW%       A shorthand notation for constructing _w_h_a_t strings:


                     %W%=%Z%%M%<tab>%I%

       %AA%       Another shorthand notation for constructing _w_h_a_t strings:


                     %A%=%Z%%Y%%M%%I%%Z%

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
       Problems can arise if the system date and time have been modified (for
       example, put forward and then back again, or unsynchronized clocks
       across a network) and can also arise when different values of the _T_Z
       environment variable are used.

       Problems of a similar nature can also arise for the operation of the
       _d_e_l_t_a utility, which compares the previous file body against the
       working file as part of its normal operation.

EEXXAAMMPPLLEESS
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _a_d_m_i_n, _d_e_l_t_a, _p_r_s, _w_h_a_t

       The Base Definitions volume of POSIX.1-2017, _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-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 .



IEEE/The Open Group                  2017                               GET(1)
