Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ get(1s) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admin

delta

sccshelp

prs

what

sccsfile



GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



-------------------------------------------------------------------------------
get



PURPOSE

Extracts a specified version of a Source Code Control System (SCCS) file.

SYNTAX


       +-------------------------------+   +---------+   +------------+
get ---| +---------------------------+ |---| one of  |---|            |---|
       +-| -b        -k    -s        |-+   | +-----+ |   +--- file ---+
        ^| -c cutoff -m    -t        ||    +-| -l  |-+     ^        |
        || -e        -n    -x list   ||      | -lp |       +--------+
        || -g        -p    -w string ||      +-----+
        || -i list   -rSID           ||
        |+---------------------------+|
        +-----------------------------+


DESCRIPTION

The get command reads the specified versions of the named Source Code Control
System (SCCS) files, creates an ASCII text file for each file according to the
specified flags, and writes each text file to a file with the same name as the
original SCCS file without the s. (s period) prefix (the g-file).  The flags
and files can be specified in any order, and all flags apply to all named
files.

If you specify a directory in place of file, the get command performs the
requested actions on all the files in the directory that begin with the s.
prefix.  If you specify a - (minus) in place of a file, the get command reads
standard input and interprets each line as the same of an SCCS file.  The get
command continues to read input until it reads END OF FILE (Ctrl-D).

If the effective user has write permission in the directory containing the SCCS
files but the real user does not, only one file can be named when the -e flag
is used.

If you are not familiar with the terms SID and delta or you do not know the
numbering system of the deltas, see AIX Operating System Programming Tools and
Interfaces for more information.

SCCS Files

In addition to the file with the s. prefix (the s-file), the get command can
create several auxiliary files:  the g-file, l-file, p-file, and z-file.  These
files are identified by their tag, the letter before the hyphen.  The get
command names auxiliary files by replacing the leading s. in the SCCS file name



Processed November 8, 1990         GET(1s,C)                                  1





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



with the proper tag, except for the g-file, which is named by removing the s.
prefix.  So, for a file named s.sample, the auxiliary file names would be
sample, l.sample, p.sample, and z.sample.

These files serve the following purposes:

s-file  This file contains the original file text and all the changes (deltas)
        made to the file.  It also includes information about who can change
        the file contents, who has made changes, when those changes were made,
        and what the changes were.  You cannot edit this file directly since
        the file is read-only.  It contains the information needed by the SCCS
        commands to build the g-file, the file you can edit.

g-file  The g-file is an ASCII text file that contains the text of the SCCS
        file version that you specify with the -r flag (or the latest trunk
        version by default).  You can edit this file directly.  When you have
        made all your changes and you want to make a new delta to the file, you
        can then apply the delta command to the file.  The get command creates
        the g-file in the current directory.

        The get command creates a g-file whenever it runs, unless the -g flag
        or the -p flag is specified.  The real user owns it (not the effective
        user).  If you do not specify the -k or the -e flag, the file is
        read-only.  If the -k or the -e flag is specified, the owner has write
        permission for the g-file You must have write permission in the current
        directory to create a g-file.

l-file  The get command creates the l-file when the -l flag is specified.  The
        l-file is a read only file.  It contains a table showing which deltas
        were applied in generating the g-file.  You must have write permission
        in the current directory to create an l-file.  Lines in the l-file have
        the following format:

          1. A blank character if the delta was applied; a "*" appears
            otherwise.

          2. A blank character if the delta was applied or was not applied and
            ignored; a * appears if the delta was not applied and was not
            ignored.

          3. A code indicating a special reason why the delta was or was not
            applied:

            Blank Included or excluded normally.
              I   Included using the -i flag.
              X   Excluded using the -x flag.
              C   Cut off using the -c flag.

          4. The SID.

          5. The date and time the file was created.




Processed November 8, 1990         GET(1s,C)                                  2





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



          6. The login name of person who created the delta.

        Comments and MR data follow on subsequent lines, indented one
        horizontal tab character.  A blank line ends each entry.

        For example, for a delta cutoff with the -c flag, the entry in the
        l-file might be:

          **C 1.3 85/03/13 12:44:16 pat

        and the entry for the initial delta might be:

              1.1 85/02/27 15:42:20 pat
          date and time created 85/02/27 15:42:20 by pat

p-file  The get command creates the p-file when the -e or the -k flag is
        specified.  The p-file passes information resulting from a get -e to a
        delta command.  The p-file also prevents a subsequent execution of get
        with a -e flag for the same SID until delta is run or the joint edit
        keyletter (j) is set in the SCCS file.  The j keyletter allows several
        gets on the same SID.  The p-file is created in the directory
        containing the SCCS file.  To create a p-file in the SCCS directory,
        you must have write permission in that directory.  The permission code
        of the p-file is read-only to all but its owner, and it is owned by the
        effective user.  The p-file contains:

          o The current SID
          o The SID of new delta to be created
          o The user name
          o The date and time of the get
          o The -i flag, if it was present
          o The -x flag, if it was present

        The p-file contains an entry with the above information for each
        pending delta for the file.  No two lines have the same new delta SID.

z-file  The z-file is a lock mechanism against simultaneous updates.  The
        z-file contains the binary process number of the get command that
        created it.  It is created in the directory containing the SCCS file
        and exists only while the get command is running.

When you use the get command, it displays the SID being accessed and the number
of lines created from the SCCS file.  If you specify the -e flag, the SID of
the delta to be made appears after the SID accessed and before the number of
lines created.  If you specify more than one file, or a directory, or standard
input, the get command displays the file name before each file is processed.
If you specify the -i flag, the get command lists included deltas below the
word "Included".  If you specify the -x flag, the get command lists excluded
deltas below the word "Excluded".

Identification Keywords




Processed November 8, 1990         GET(1s,C)                                  3





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



You can use identification keywords in your files to insert identifying
information.  These keywords are replaced by their values in the g-file when
the get command is invoked without the -e or -k flag.

Note:  For unformatted files, insert a null effect troff sequence into the
       keywords so that sccs will not expand them; for example, %M% becomes
       %M\&%.

The following identification keywords can be used in SCCS files:

%M%   Module name: the value of the m flag in the SCCS file
%I%   The SID (%R%.%L%.%B%.%S%) of the g-file
%R%   Release
%L%   Level
%B%   Branch
%S%   Sequence
%D%   Date of the current get (YY/MM/DD)
%H%   Date of the current get (MM/DD/YY)
%T%   Time of the current get (HH:MM:SS)
%E%   Date newest applied delta was created (YY/MM/DD)
%G%   Date newest applied delta was created (MM/DD/YY)
%U%   Time newest applied delta was created (HH:MM:SS)
%Y%   Module type:  the value of the t flag in the SCCS file
%F%   SCCS file name
%P%   Full path name of the SCCS file
%Q%   The value of the q flag in the file
%C%   The current line number.  This keyword is intended for identifying
      messages output by the program.  It is not intended to be used on every
      line to provide sequence numbers.
%Z%   The 4-character string "@(#)" recognized by the what command
%W%   A shorthand notation for constructing what command strings for AIX
      program files.  Its value is the characters and keyletters:

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

%A%   Another shorthand notation for constructing what command strings for
      non-AIX program files.  Its value is the keyletters:

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


Figure 4 illustrates how the get command determines the SID of the file it
retrieves, and what the pending SID is.  The column SID Specified shows the
various ways the SID can be specified with the -r flag.  The two columns
illustrate the various conditions that can exist, including whether the -b flag
is used with the get -e command.  The SID Retrieved indicates the SID of the
file that makes up the g-file.  The SID of Delta to be Created column indicates
the SID of the version that will is created when the delta command is applied.







Processed November 8, 1990         GET(1s,C)                                  4





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



+-----------------------------------------------------------------------------+
|Figure 4. SID Determination for get Command                                  |
+-------------+-----+-------------------------------+---------+---------------+
|SID          | -b  | Other                         | SID     |  SID of       |
|Specified    | Used| Conditions                    |         | Delta         |
|             |     |                               | Retrieve|   to be       |
|             |     |                               |         | Created       |
+-------------+-----+-------------------------------+---------+---------------+
|none1        | no  | R defaults to mR2             | mR.mL   | mR.(mL+1)     |
+-------------+-----+-------------------------------+---------+---------------+
|none1        | yes | R defaults to mR              | mR.mL   | mR.mL.(mB+1).1|
+-------------+-----+-------------------------------+---------+---------------+
|(R)elease    | no  | R > mR                        | mR.mL   | R.13          |
+-------------+-----+-------------------------------+---------+---------------+
|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            | N/A | R < mR and R does not exist   | hR.mL6  | hR.mL.(mB+1).1|
+-------------+-----+-------------------------------+---------+---------------+
|R            | N/A | R < mR and R exists           | R.mL    | R.mL.(mB+1).1 |
+-------------+-----+-------------------------------+---------+---------------+
|R.(L)evel    | no  | No trunk successor            | R.L     | R.(L+1)       |
+-------------+-----+-------------------------------+---------+---------------+
|R.L          | yes | No trunk successor            | R.L     | R.L(mB+1).1   |
+-------------+-----+-------------------------------+---------+---------------+
|R.L          | N/A |Trunk successor in release => R| R.L     | R.L.(mB+1).1  |
+-------------+-----+-------------------------------+---------+---------------+
|R.L.(B)ranch | 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)eque|cno  | 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      | N/A | Branch successor              | R.L.B.S | R.L.(mB+1).1  |
+-------------+-----+-------------------------------+---------+---------------+
|                                                                             |
|1 Applies only if the d (default SID) flag is not present in the file (see   |
|"admin")                                                                     |
|2 The mR indicates the maximum existing release.                             |
|3 Forces creation of the first delta in a new release.                       |
|6 The hR is the highest existing release that is lower than the specified,   |
|nonexistent, release R.                                                      |
+-----------------------------------------------------------------------------+


FLAGS




Processed November 8, 1990         GET(1s,C)                                  5





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



-b           Specifies that the delta to be created should have an SID in a new
             branch.  The new SID is numbered according to the rules stated in
             Figure 4.  You can use the -b flag only with the -e flag.  It is
             necessary only when you want to branch from a leaf delta (a delta
             without a successor).  Attempting to create a delta at a nonleaf
             delta automatically results in a branch, even if the b header flag
             is not set.  If you do not specify the b header flag in the SCCS
             file, the get command ignores the -b flag because the file does
             not allow branching (see the discussion of header flags on page
             admin-3).

-c cutoff    Specifies a cutoff date and time, in the form:
             YY[MM[DD[HH[MM[SS]]]]].  The get command includes no deltas to the
             SCCS file created after the specified cutoff in the g-file.  The
             values of any unspecified items in the cutoff default to their
             maximum allowable values.  Thus, a cutoff date and time specified
             with only the year (YY) specifies the last month, day, hour,
             minute, and second of that year.  Any number of non-numeric
             characters can separate the two-digit items of the cutoff date and
             time.  This allows you to specify a date and time in a number of
             ways, as follows:

               -c85/9/2,9:00:00
               -c"85/9/2 9:00:00"
               "-c85/9/2 9:00:00"

-e           Indicates that the g-file being created is to be edited by the
             user applying the get command.  The changes are recorded later
             with the delta command.  get -e creates a p-file that prevents
             other users from issuing another get -e command and editing a
             second g-file on the same SID before delta is run.  The owner of
             the file can override this restriction by allowing joint editing
             on the same SID through the use of the admin command with the -fj
             flag.  Other users, with permission, can obtain read-only copies
             by using the get command without the -e flag.  The get -e command
             enforces SCCS file protection specified via the ceiling, floor,
             and authorized user list in the SCCS file (see "admin").

-g           Suppresses the actual retrieval of text from the SCCS file.  Use
             the -g flag primarily to create an l-file or to verify the
             existence of a particular SID.  Do not use it with the -e flag.

-i list      Specifies a list of deltas to be included in the creation of a
             g-file.  The SID list format consists of a combination of
             individual SIDs separated by commas and SID ranges indicated by
             two SIDs separated by a hyphen.  You specify the same SIDs with
             both the following command lines:

               get -e -i1.4,1.5,1.6 s.file
               get -e -i1.4-1.6 s.file





Processed November 8, 1990         GET(1s,C)                                  6





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



             You can specify the SCCS Identification of a delta in any form
             shown in the SID Specified column of Figure 4.  The get command
             interprets partial SIDs as shown in the SID Retrieved column of
             the table.

-k           Suppresses replacement of identification keywords in the g-file by
             their value (see "Identification Keywords").  The -k flag is
             implied by the -e flag.  If you accidentally ruin the g-file
             created by get with an -e flag, you can recreate it by reissuing
             the get command with the -k flag in place of the -e flag.

-l[p]        Writes a delta summary to an l-file.  If you specify -lp, the
             delta summary is written to standard output, and the get command
             does not create the l-file.  Use this flag to determine which
             deltas were used to create the g-file currently in use.  See "SCCS
             Files" for the format of the l-file.

-m           Writes before each line of text in the g-file the SID of the delta
             that inserted the line into the SCCS file.  The format is:

             SID  tab  line of text

-n           Writes the value of the %M% keyword before each line of text in
             the g-file (see "Identification Keywords" for information on
             keywords).  The format is the value of %M%, followed by a
             horizontal tab, followed by the text line.  When both the -m and
             -n flags are used, the format is:

             %M% value    tab    SID    tab    line of text

-p           Writes the text created from the SCCS file to standard output and
             does not create a g-file.  The get command sends output normally
             sent to standard output to file descriptor 2 instead.  If you
             specify the -s flag with the -p flag, output normally sent to
             standard output does not appear anywhere.  Do not use the -p flag
             with the -e flag.

-rSID        Specifies the SCCS identification string (SID) of the SCCS file
             version to be created.  Figure 4 shows what version of a file is
             created and the SID of the pending delta as functions of the SID
             specified.

-s           Suppresses all output normally written to standard output.  Error
             messages (written to standard error output) remain unaffected.

-t           Accesses the most recently created delta in a given release or
             release and level.  Without the -r flag, the get command accesses
             the most recent delta regardless of its SID.

-w string    Substitutes string for the %W% keyword in g-files not intended for
             editing (see "SCCS Files" for information on g-files).




Processed November 8, 1990         GET(1s,C)                                  7





GET(1s,C)                   AIX Commands Reference                    GET(1s,C)



-x list      Excludes a list of deltas in the creation of a file.  See the -i
             flag for the SID list format on page         6.

EXAMPLES

  1. To get an SCCS file for editing:

      get  -e  s.prog.c

    This command creates a file named "prog.c" that only you have permission to
    modify.  It also creates a p.prog.c file that prevents other users from
    using a get -e and editing a second prog.c file on the same SID before the
    delta is run.  No one else can use "prog.c" or "s.prog.c" until you use the
    delta command to indicate that you are finished.

  2. To get an SCCS file for reading:

      get  s.prog.c

    This command creates a file named "prog.c" that anyone can read, but that
    no one can modify.  You can do this before searching files with the grep
    command or before compiling programs that are controlled with SCCS.

RELATED INFORMATION

See the following commands:  "admin,"  "delta,"  "sccshelp," "prs," and
"what."

See the sccsfile file in AIX Operating System Technical Reference.

See the discussion of SCCS in AIX Operating System Programming Tools and
Interfaces.























Processed November 8, 1990         GET(1s,C)                                  8



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026