get - get a version of an SCCS file (DEVELOPMENT)
get [-begkmlLpst][-c cutoff][-i list][-r SID][-x list] file... get [-begkmpst][-c cutoff][-i list][ -l[p]][-r SID][-x list] file...
The get utility generates a text file from each named SCCS file according to the specifications given by its options.The generated text is normally written into a file called the g-file whose name is derived from the SCCS filename by simply removing the leading s..
The get utility supports the XBD specification, Utility Syntax Guidelines , except that, in the obsolescent form, -l option has an optional option-argument that cannot be presented as a separate argument (-lp). When the -l and -p options are both needed, the application must avoid ambiguity by giving them as separate arguments (-l -p), reversing their sequence (-pl) or separating them with other options in a single argument (such as -ltp). The following options are supported:
- -r SID
- 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 delta if the -e option is also used), as a function of the SID specified.
- -c cutoff
- Indicate the cutoff date-time, in the form:
For the YY component, values in the range [69-99] refer to years in the twentieth century (1969 to 1999 inclusive); values in the range [00-68] refer to years in the twenty-first century (2000 to 2068 inclusive). No changes (deltas) to the SCCS file that were created after the specified cutoff date-time are included in the generated text file. Units omitted from the date-time default to their maximum possible values; for example, -c 7502 is equivalent to -c 750228235959. Any number of non-numeric characters may separate the various 2-digit pieces of the cutoff date-time. This feature allows the user to specify a cutoff date in the form: -c "77/2/2 9:22:25".YY[MM[DD[HH[MM[SS]]]]]
- -e
- Indicate that the get is for the purpose of editing or making a change (delta) to the SCCS file via a subsequent use of delta. The -e option used in a get for a particular version (SID) of the SCCS file prevents further get commands from editing on the same SID until delta is executed or the j (joint edit) flag is set in the SCCS file. Concurrent use of get -e for different SIDs is always allowed. If the g-file generated by get with a -e option is accidentally ruined in the process of editing, it may be regenerated by reexecuting the get command with the -k option in place of the -e option. SCCS file protection specified via the ceiling, floor and authorised user list stored in the SCCS file is enforced when the -e option is used.
- -b
- Use with the -e option to indicate that the new delta should have an SID in a new branch as shown in the table below. This option is ignored if the b 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.)
- Note:
- A branch delta may always be created from a non-leaf delta.
- -i list
- Indicate a list of deltas to be included (forced to be applied) in the creation of the generated file. The list 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 below. Partial SIDs are interpreted as shown in the "SID Retrieved" column of the table below.
- -x list
- Indicate a list of deltas to be excluded (forced not to be applied) in the creation of the generated file. See the -i option for the list format.
- -k
- Suppress replacement of identification keywords (see below) in the retrieved text by their value. The -k option is implied by the -e option.
- -l
- Write a delta summary into an l-file.
- -L
- Write a delta summary to standard output. All informative output that normally is written to standard output will be written to standard error instead, unless the -s option is used, in which case it is suppressed.
- -lp
- Equivalent to -L.
- -p
- Write the text retrieved from the SCCS file to the standard output. No g-file is created. All informative output that normally goes to the standard output goes to standard error instead, unless the -s option is used, in which case it disappears.
- -s
- Suppress all informative output normally written to standard output. However, fatal error messages (which are always written to the standard error) remain unaffected.
- -m
- 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 is:
"%s\ts", <SID>, <text line>
- -n
- Precede each generated text line with the %M% identification keyword value (see below). The format is:
"%s\ts", <%M% value>, <text line>
When both the -m and -n options are used, the <text line> is replaced by the -m option-generated format.
- -g
- Suppress the actual retrieval of text from the SCCS file. It is primarily used to generate an l-file, or to verify the existence of a particular SID.
- -t
- Use to access the most recently created (top) delta in a given release (for example, r-1), or release and level (for example, r-1.2).
The following operands are supported:
- file
- A pathname of an existing SCCS file or a directory. If file is a directory, get behaves 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 are silently ignored. If a single instance file is specified as -, the standard input is 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 are silently ignored.
The standard input is a text file used only if the file operand is specified as -. Each line of the text file is interpreted as an SCCS pathname.
The SCCS files are files of an unspecified format.
The following environment variables affect the execution of get:
- LANG
- Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
- LC_ALL
- If set to a non-empty string value, override the values of all the other internationalisation variables.
- LC_CTYPE
- Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- 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, and informative messages written to standard output (or standard error, if the -p option is used).
- NLSPATH
- Determine the location of message catalogues for the processing of LC_MESSAGES .
Default.
For each file processed, get writes 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", <SID>, <number of lines>
If the -e option is used, the SID of the delta to be made appears after the SID accessed and before the number of lines generated, in the POSIX locale:
"%s\nnew delta %s\n%d\n", <SID accessed>, <SID to be made>, <number of lines>If there is more than one named file or if a directory or standard input is named, each pathname is written before each of the lines shown in one of the preceding formats:
"\n%s:\n", <pathname>
If the -L (or -lp) option is used, a delta summary will be written following the format specified below for l-files.
If the -i option is used, included deltas are listed following the notation, in the POSIX locale:
"Included:\n"
If the -x option is used, excluded deltas are listed following the notation, in the POSIX locale:
"Excluded:\n"
If the -p, -L or -lp options are specified, the standard output consists of the text retrieved from the SCCS file.
The standard error is used only for diagnostic messages, except if the -p, -L or -lp options are specified, it includes all informative messages normally sent to standard output.
Several auxiliary files may be created by get. These files are known generically as the g-file, l-file, p-file and z-file. The letter before the hyphen is called the tag . An auxiliary filename is formed from the SCCS file name: the last component of all SCCS filenames must be of the form s.module-name the auxiliary files are named by replacing the leading s with the tag. The g-file is an exception to this scheme: the g-file is named by removing the s. prefix. For example, for s.xyz.c, the auxiliary filenames would be xyz.c, l.xyz.c, p.xyz.c and z.xyz.c, respectively.The g-file, which contains the generated text, is created in the current directory (unless the -p option is used). A g-file is created in all cases, whether or not any lines of text were generated by the get. It is owned by the real user. If the -k option is used or implied, it is writable by the owner only (read-only for everyone else); otherwise it is read-only. Only the real user need have write permission in the current directory.
The l-file contains a table showing which deltas were applied in generating the retrieved text. The l-file is created in the current directory if the -l option is used; it is 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 l-file have the following format:
"%c%c%c%s\t%s%s\n", <code1>, <code2>, <code3>, <SID>, <date-time>, <login>
where the entries are:
- <code1>
- A space character if the delta was applied; "*" otherwise.
- <code2>
- A space character if the delta was applied or was not applied and ignored; "*" if the delta was not applied and was not ignored.
- <code3>
- A character indicating a special reason why the delta was or was not applied:
- I
- Included.
- X
- Excluded.
- C
- Cut off (by a -c option).
- <date-time>
- Date and time (using the date utility's %y/%m/%d%T format) of creation.
- <login>
- Login name of person who created delta.
The comments and MR data follow on subsequent lines, indented one tab character. A blank line terminates each entry.
The p-file is used to pass information resulting from a get with a -e option along to delta. Its contents are also used to prevent a subsequent execution of get with a -e option for the same SID until delta is executed or the joint edit flag, j, is set in the SCCS file. The p-file is created in the directory containing the SCCS file and the effective user must have write permission in that directory. It is writable by owner only, and it is owned by the effective user. Each line in the p-file has the following format:
"%s%s%s%s%s%s\n", <g-file SID>, <SID of new delta>, <login-name of real user>, <date-time>, <i-value>, <x-value>
where <i-value> uses the format "" if no -i option was specified and uses the format:
if a -i option was specified, and <x-value> uses the format "" if no -x option was specified, and uses the format:
"-i%s", <i option option-argument>
if a -x option was specified. There can be an arbitrary number of lines in the p-file at any time; no two lines can have the same new delta SID.
"-x%s", <x option option-argument>
The z-file serves as a lock-out mechanism against simultaneous updates. Its contents are the binary process ID of the command (that is, get) that created it. The z-file is created in the directory containing the SCCS file for the duration of get. The same protection restrictions as those for the p-file apply for the z-file. The z-file is created read-only.
Determination of SCCS Identification String SID* -b Keyletter Other SID SID of Delta Specified Used Conditions Retrieved to be Created 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 not exist hR.mL** hR.mL.(mB+1).1 R - Trunk successor in release > R and R exists R.mL R.mL.(mB+1).1 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 release >= R R.L R.L.(mB+1).1 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 must exist.
- **
- hR is the highest existing release that is lower than the specified, non-existent, release R.
- ***
- This is used to force creation of the first delta in a new release.
- The -b option is effective only if the b flag is present in the file. An entry of - means "irrelevant".
- This case applies if the d (default SID) flag is not present in the file. If the d flag is present in the file, then the SID obtained from the d flag is interpreted as if it had been specified on the command line. Thus, one of the other cases in this table applies.
Identification Keywords
Identifying information is 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:
- %M%
- Module name: either the value of the m flag in the file, or if absent, the name of the SCCS file with the leading s. removed.
- %I%
- SCCS identification (SID) (%R%.%L% or %R%.%L%.%B%.%S%) of the retrieved text
- %R%
- Release.
- %L%
- Level.
- %B%
- Branch.
- %S%
- Sequence.
- %D%
- Current date (YY/MM/DD).
- %H%
- Current date (MM/DD/YY).
- %T%
- Current time (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: value of the t flag in the SCCS file.
- %F%
- SCCS filename.
- %P%
- SCCS absolute pathname.
- %Q%
- The value of the q flag in the file.
- %C%
- 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.
- %Z%
- The four-character string @(#) recognisable by what.
- %W%
- A shorthand notation for constructing what strings:
%W%=%Z%%M%<tab>%I%
- %A%
- Another shorthand notation for constructing what strings:
%A%=%Z%%Y%%M%%I%%Z%
The following exit values are returned:
- 0
- Successful completion.
- >0
- An error occurred.
Default.
None.
None.
The -lp option may be withdrawn in a future issue.
admin, delta, prs, what.