Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ get(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admin

delta

help

prs

what

get

PURPOSE

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

SYNOPSIS
     get [-rSID] [-ccutoff] [-ilist] [-xlist] [-wstring] [-aseq-no.] [-k] [-e]
     [-l[p]] [-p] [-m] [-n] [-s] [-b] [-g] [-t] files


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, get 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, get reads standard input and
     interprets each  line as the  name of an SCCS  file.  get
     continues  to  read input  until  it  reads END  OF  FILE
     (Ctrl-D).

     If the effective user has  write permission in the direc-
     tory containing  the SCCS  files but  the real  user does
     not, then 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),
     get  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.   get names
     auxiliary files by  replacing the leading s.  in the SCCS
     file name  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.
             get 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 speci-
             fied.  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.
             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 effec-
             tive 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  simul-
             taneous 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, get displays the
     file name before each file  is processed.  If you specify
     the -i  flag, get  lists included  deltas below  the word
     "Included".   If  you  specify  the -x  flag,  get  lists
     excluded deltas below the word "Excluded".

       Identification Keywords

     You  can use  identification  keywords in  your files  to
     insert  identifying  information.    These  keywords  are
     replaced  by  their values  in  the  g-file when  get  is
     invoked without the  -e or -k flag.   The following iden-
     tification 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 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
           strings for   non-AIX program files.  Its  value is
           the keyletters:

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

     The following  table illustrates  how get  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 or not the -b flag is used with the get
     -e.  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  be
     created when delta is applied.

+--------------+-----+-----------------------------+---------+--------------+
| SID          | -b  | Other                       | SID     |  SID of Delta|
| Specified    | Used| Conditions                  |  Retriev|d  to be Creat|d
+--------------+-----+-----------------------------+---------+--------------+
| none(1)      | no  | R defaults to mR(2)         | mR.mL   | mR.(mL+1)    |
+--------------+-----+-----------------------------+---------+--------------+
| none(1)      | yes | R defaults to mR            | mR.mL   | mR.mL.(mB+1).|
+--------------+-----+-----------------------------+---------+--------------+
| (R)elease    | no  | R > mR                      | mR.mL   | R.1(3)       |
+--------------+-----+-----------------------------+---------+--------------+
| R            | no  | R = mR                      | mR.mL   | mR.(mL+1)    |
+--------------+-----+-----------------------------+---------+--------------+
| R            | yes | R > mR                      | mR.mL   | mR.mL.(mB+1).|
+--------------+-----+-----------------------------+---------+--------------+
| R            | yes | R = mR                      | mR.mL   | mR.mL.(mB+1).|
+--------------+-----+-----------------------------+---------+--------------+
| R            | N/A | R < mR and R does not exist | hR.mL(4)| hR.mL.(mB+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.L     | R.L.(mB+1).1 |
|              |     | Y R                         |         |              |
+--------------+-----+-----------------------------+---------+--------------+
| 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.                  |
| (4) The hR is the highest existing  release that is lower than the speci- |
| fied, nonexistent, release R.                                             |
+---------------------------------------------------------------------------+

Figure 2.  SID Determination

FLAGS

-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 2.  You can use -b only with the -e flag.  It is only neces-
          sary when you want  to branch from a leaf delta  (a delta without a
          successor).  Attempting to create a  delta at a nonleaf delta auto-
          matically 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, get
          ignores the -b flag because the  file does not allow branching (see
          the discussion of header flags on page ).

-ccutoff  Specifies    a   cutoff    date    and   time,    in   the    form:
          YY[MM[DD[HH[MM[SS]]]]]  get 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 allow-
          able values.  Thus, a cutoff date  and time specified with only the
          year  (YY) would  specify the  last month,  day, hour,  minute, and
          second of that year.  Any number of nonnumeric characters can sepa-
          rate 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  get.   The changes  are  recorded  later with  the  delta
          command.  get  -e creates a  p-file that prevents other  users from
          issuing another get -e 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 per-
          mission, can  obtain read-only copies  by using get 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 exist-
          ence of a particular SID.  Do not use it with the -e flag.
-ilist    Specifies a  list of  deltas to  be included in  the creation  of a
          g-file.  The  SID list  format consists of  a combination  of indi-
          vidual 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

          You can  specify the  SCCS Identification  of a  delta in  any form
          shown  in the  SID Specified  column of  Figure 2.  get  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 get 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, fol-
          lowed 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.   get 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 -p with the -e flag.
-rSID     Specifies the  SCCS identification  string (SID)  of the  SCCS file
          version to be  created.  Figure 2  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,  get accesses  the most
          recent delta regardless of its SID.
-wstring  Substitutes string for the %W%  keyword in g-files not intended for
          editing (see "SCCS Files" for information on g-files).
-xlist    Excludes a list  of deltas in the  creation of a file.   See the -i
          flag for the SID list format.

EXAMPLES

1.  To get an SCCS file for editing:

      get  -e  s.prog.c

    This  creates a  file named  "prog.c" that  only you  have permission  to
    modify.  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 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.   If you are
    also  using the  make command  to manage  the development  of a  software
    project, make automatically does the get before compiling a program.

RELATED INFORMATION

The following commands:   "admin,"  "delta," "help,"  "prs," and  "what."

The sccsfile file in AIX Operating System Technical Reference.

The discussion of  SCCS in AIX Operating System Programming  Tools and Inter-
faces.

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