sccs-get(1) | User Commands | sccs-get(1) |
sccs-get, get - retrieve a version of an SCCS file
/usr/ccs/bin/get [-beFgkmnopst] [-l [p]]
[-asequence]
[-c date-time | -cdate-time]
[-Gg-file] [-w%W%-string]
[-i sid-list | -isid-list]
[-q[nsedelim]] [-r [sid]]
[-x sid-list | -xsid-list]
[-z[cmr]]
[-Nbulk-spec] s.filename...
/usr/xpg4/bin/get [-beFgkmnopst] [-l [p]] [-a sequence]
[-c date-time | -cdate-time ] [-G g-file] [-w %W%-string]
[-i sid-list | -isid-list ] [-q [nsedelim]] [-r sid | -rsid ]
[-x sid-list | -xsid-list ] [-z [cmr]]
[-N bulk-spec] s.filename...
The get utility retrieves a working copy from the SCCS history file, according to the specified options.
For each s.filename argument, get displays the SCCS delta ID (SID) and number of lines retrieved.
If a directory name is used in place of the s.filename argument, the get command applies to all s.files in that directory. Unreadable s.files produce an error; processing continues with the next file (if any). The use of `−' as the s.filename argument indicates that the names of files are to be read from the standard input, one s.file per line.
The retrieved file normally has the same filename base as the s.file, less the prefix, and is referred to as the g-file.
For each file processed, get responds (on the standard output) with the SID being accessed, and with the number of lines retrieved from the s.file.
The following options are supported:
This option is a SCHILY extension that does not exist in historic sccs implementations.
yy[mm[dd[ hh[mm[ss]]]]]
Units omitted from the indicated date and time default to their maximum possible values; that is -c7502 is equivalent to -c750228235959. Values of yy in the range 69−99 refer to the twentieth century. Values in the range 00−68 refer to the twenty-first century. Any number of non-numeric characters may separate the various 2 digit components. If white-space characters occur, the date-time specification must be quoted.
A date-time specification in the form:
yyyy/[mm[dd[hh[mm[ss]]]]]
refers to a 4-digit year and allows to specify a year outside the range 1969−2068.
This option is a SCHILY extension that does not exist in historic sccs implementations.
The bulk-spec parameter is composed from an optional list of flag parameters followed by an optional path specifier.
The following flag types are supported:
+sid+filename
This permits each file to be retrieved with an individual SID.
The following path specifier types are supported:
A typical value for dir is SCCS.
In order to overcome the limited number of exec(2) arguments, it is recommended to use `−' as the file name parameter for get(1) and to send a list of path names to stdin.
This option is a SCHILY extension that does not exist in historic sccs implementations.
Use this option with care, as it may be in conflict with make(1) rules. Using `get -o' thus may cause make to perform an automatic retrieval of the latest version as the s.file is newer than the gotten file, or cause make to skip the compilation as the compilation result is already newer than the gotten file.
This option is a SCHILY extension that does not exist in historic sccs implementations.
In NSE mode, get never issues a warning about missing id keywords.
This option is an undocumented SUN extension that does not exist in historic sccs implementations.
This option is an undocumented SUN extension that does not exist in historic sccs implementations.
This option is an undocumented SUN extension that does not exist in historic sccs implementations.
This option is a SCHILY extension that does not exist in historic sccs implementations.
This option is a SCHILY extension that does not exist in historic sccs implementations.
This option is an undocumented SUN extension that does not exist in historic sccs implementations.
The SID for a given delta is a number, in Dewey decimal format, composed of two or four fields: the release and level fields, and for branch deltas, the branch and sequence fields. For instance, if 1.2 is the SID, 1 is the release, and 2 is the level number. If 1.2.3.4 is the SID, 3 is the branch and 4 is the sequence number.
You need not specify the entire SID to retrieve a version with get. When you omit -r altogether, or when you omit both release and level, get normally retrieves the highest release and level. If the d flag is set to an SID in the s.file and you omit the SID, get retrieves the default version indicated by that flag.
When you specify a release but omit the level, get retrieves the highest level in that release. If that release does not exist, get retrieves highest level from the next-highest existing release.
Similarly with branches, if you specify a release, level and branch, get retrieves the highest sequence in that branch.
The output format for /usr/ccs/bin/get is as follows:
"%s\n%d lines\n", <SID>, <number of lines>
The text lines may appear in the language of the current locale.
The output format for /usr/xpg4/bin/get is as follows:
"%s\n%d lines\n", <SID>, <number of lines>
The text lines is always in English.
Usage guidelines are as follows:
In the absence of -e or -k, get expands the following ID keywords by replacing them with the indicated values in the text of the retrieved source.
Keyword | Value |
%A% | Shorthand notation for an ID line with data for what(1): %Z%%Y% %M% %I%%Z% |
%B% | SID branch component |
%C% | Current line number. Intended for identifying messages output by the program such as ``this shouldn't have happened'' type errors. It is not intended to be used on every line to provide sequence numbers. |
%D% | Current date: yy/mm/dd |
%d% | Current date: yyyy/mm/dd |
%E% | Date newest applied delta was created: yy/mm/dd |
%e% | Date newest applied delta was created: yyyy/mm/dd |
%F% | SCCS s.file name |
%G% | Date newest applied delta was created: mm/dd/yy |
%g% | Date newest applied delta was created: mm/dd/yyyy |
%H% | Current date: mm/dd/yy |
%h% | Current date: mm/dd/yyyy |
%I% | SID of the retrieved version: %R%.%L%.%B%.%S% |
%L% | SID level component |
%M% | Module name: either the value of the m flag in the s.file (see sccs-admin(1)), or the name of the s.file less the prefix |
%P% | Fully qualified s.file name |
%Q% | Value of the q flag in the s.file |
%R% | SID Release component |
%S% | SID Sequence component |
%T% | Current time: hh:mm:ss |
%U% | Time the newest applied delta was created: hh:mm:ss |
%W% | Shorthand notation for an ID line with data for what: %Z%%M% %I% or get -w argument |
%Y% | Module type: value of the t flag in the s.file |
%Z% | 4-character string: `@(#)', recognized by what |
A line with a string in the form %sccs.include.filename% is replaced by the content of the file filename. The file is searched for in the path list found in the environment variable SCCS_INCLUDEPATH.
The keywords %d%, %e%, %g% and %h% are only expanded if either the `x' flag has been set by the admin(1) command or if the expansion for a specific keyword has been enabled via the `y' flag.
The table below explains how the SCCS identification string is determined for retrieving and creating deltas.
Determination of SCCS Identification String | ||||
SID (1) | -b Option | Other | SID | SID of Delta |
Specified | Used (2) | Conditions | Retrieved | to be Created |
none (3) | no | R defaults to mR | mR.mL | mR.(mL+1) |
none (3) | yes | R defaults to mR | mR.mL | mR.mL.(mB+1).1 |
R | no | R > mR | mR.mL | R.1 (4) |
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 (5) | hR.mL.(mB+1).1 |
R | − | Trunk succ. (6) in release > R and R exists | R.mL | R.mL.(mB+1).1 |
R.L | no | No trunk succ. | R.L | R.(L+1) |
R.L | yes | No trunk succ. | R.L | R.L.(mB+1).1 |
R.L | − | Trunk succ. in release ≥ R | R.L | R.L.(mB+1).1 |
R.L.B | no | No branch succ. | R.L.B.mS | R.L.B.(mS+1) |
R.L.B | yes | No branch succ. | R.L.B.mS | R.L.(mB+1).1 |
R.L.B.S | no | No branch succ. | R.L.B.S | R.L.B.(S+1) |
R.L.B.S | yes | No branch succ. | R.L.B.S | R.L.(mB+1).1 |
R.L.B.S | − | Branch succ. | R.L.B.S | R.L.(mB+1).1 |
See environ(5) for descriptions of the following environment variables that affect the execution of get(1): LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, and NLSPATH.
The following exit values are returned:
The old-sid is the SID that was checked out with get -e, the new-sid is the SID that will be used for the new version when delta is called. The username is the user-name corresponding to the real user ID at the time get -e was called. The date and time fields are in the same format as used in the delta table of the s.file as described in sccsfile(4) for SCCS v4. In order to grant POSIX compatibility, a two digit year is used between 1969 and 2068. For years outside that range, a four digit year is used. The following fields are only present when one or more of the -i -x or -z options have been specified on the command line, they refer to the list of included and excluded deltas or to the CMR list from the NSE enhancements.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWsprot |
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWxcu4t |
Interface Stability | Standard |
sccs(1), sccs-admin(1), sccs-cdc(1), sccs-comb(1), sccs-cvt(1), sccs-delta(1), sccs-help(1), sccs-log(1), sccs-prs(1), sccs-prt(1), sccs-rmdel(1), sccs-sact(1), sccs-sccsdiff(1), sccs-unget(1), sccs-val(1), bdiff(1), diff(1), what(1), sccschangeset(4), sccsfile(4), attributes(5), environ(5), standards(5).
Use the SCCS help command for explanations (see sccs-help(1)).
If the effective user has write permission (either explicitly or implicitly) in the directory containing the SCCS files, but the real user does not, only one file may be named when using -e.
The SCCS suite was originally written by Marc J. Rochkind at Bell Labs in 1972. Release 4.0 of SCCS, introducing new versions of the programs admin(1), get(1), prt(1), and delta(1) was published on February 18, 1977; it introduced the new text based SCCS v4 history file format (previous SCCS releases used a binary history file format). The SCCS suite was later maintained by various people at AT&T and Sun Microsystems. Since 2006, the SCCS suite is maintained by Joerg Schilling.
A frequently updated source code for the SCCS suite is included in the schilytools project and may be retrieved from the schilytools project at Sourceforge at:
http://sourceforge.net/projects/schilytools/
The download directory is:
http://sourceforge.net/projects/schilytools/files/
Check for the schily-*.tar.bz2 archives.
Less frequently updated source code for the SCCS suite is at:
http://sourceforge.net/projects/sccs/files/
Separate project informations for the SCCS project may be retrieved from:
http://sccs.sf.net
2018/12/18 | SunOS 5.11 |