admin(CP)
admin --
create and administer SCCS files
Syntax
admin [ [-n] [[-i[name]] [-b] [-rrel]] [-tname] [-m[mrlist]] [-y[comment]] ]
files
admin [-t[name]] [-fflag[value]] [-dflag[value]] [-alogin] [-elogin] files
admin [-h] [-z] files
Description
The admin command is used to create new
SCCS files or to change parameters of existing ones.
Arguments to admin, which may appear in any
order, consist of keyletter arguments and named files.
(Note that SCCS file names
must begin with the characters ``s.''.)
If a named file does not exist, it is created, and its
parameters are initialized according to the specified keyletter arguments.
Parameters not initialized by a keyletter argument are
assigned a default value.
If a named file does exist, parameters corresponding to
specified keyletter arguments are changed, and other
parameters are left as they are.
If a directory is named, admin behaves as though
each file in the directory were specified as a named file,
except that non-SCCS files and
unreadable files are silently ignored.
If a name of ``-'' is given, standard input is read;
each line of the standard input is taken to be the name of
an SCCS file to be processed.
Again, non-SCCS files and unreadable files are
silently ignored.
The options and arguments follow.
Each is explained as though only one named file is to be
processed since the effects of the arguments apply
independently to each named file.
-n-
Creates a new SCCS file.
-i[name]-
Creates a new SCCS file, taking the text from the file name
or from standard input if the file name is omitted.
(If name is a binary file,
then you must specify the -b option.)
The text constitutes the first delta of the file (see
the -r option for delta numbering scheme).
If this option is omitted, then the SCCS file
is created empty. Only one SCCS file may be created by an
admin command on which the -i
option is supplied.
Using a single admin command to create two or
more SCCS files requires that they be created
empty (no -i option).
Note that -i implies -n.
-rrel-
The release into which the initial delta is inserted;
if not specified it is inserted into release 1.
This option may be used only if -i is also used.
The level of the initial delta is always 1.
(Initial deltas are named 1.1 by default.)
-b-
Encode the contents of the file specified by -iname.
This keyletter must be used if name is a binary file;
-t[name]-
Inserts, removes, or replaces descriptive text in an SCCS file.
The name argument specifies a file
from which the descriptive text is to be taken.
When creating a new SCCS file (using -n
and/or -i options), the name must be provided.
Remove any descriptive text currently in an existing SCCS file,
by specifying -t without an argument.
Replace any descriptive text currently in an existing SCCS file,
by specifying a file name which contains the replacement text.
-fflag-
This option specifies a flag,
and possibly a value for the flag,
to be placed in the SCCS file.
The -f option may be supplied several times.
The allowable flags and their values are:
b-
Allows use of get -b to create branch deltas.
cceil-
The highest release (the ``ceiling''), a number greater
than 0 but less than or equal to 9999, which may be retrieved by a
get(CP)
command for editing. The default value for an unspecified c
flag is 9999.
ffloor-
The lowest release (the ``floor''), a number greater
than 0 but less than 9999, which may be retrieved by a
get(CP)
command for editing.
The default value for an unspecified f flag is 1.
dSID-
The default delta number (SID.1) to be used by a
get(CP)
command.
i[str]-
Causes the
No id keywords (ge6)
message issued by
get(CP)
or
delta(CP)
to be treated as a fatal error.
In the absence of this flag, the message is only a warning.
The message is issued if no SCCS identification
keywords are found in the text retrieved or stored in
the SCCS file.
If a value is supplied, the keywords must exactly match the
given string; however, the string must contain a keyword
and no embedded newlines.
j-
Allows concurrent
get(CP)
commands for editing on the same SID of an
SCCS file. This allows multiple concurrent updates to the same
version of the SCCS file.
llist-
A list of releases to which deltas can no longer
be made (get -e against one of these ``locked''
releases fails).
The list has the following syntax:
<list> ::= <range> | <list> , <range>
<range> ::= RELEASE_NUMBER | a
The character ``a'' in the list is
equivalent to specifying all releases for the named
SCCS file.
n-
Causes
delta(CP)
to create a ``null'' delta
in each of those releases (if any) being skipped when
a delta is made in a new release (for example, in making delta
5.1 after delta 2.7, releases 3 and 4 are skipped).
These null deltas serve as ``anchor points'' so that
branch deltas may later be created from them.
The absence of this flag causes skipped releases to be
nonexistent in the SCCS file, preventing branch
deltas from being created from them in the future.
qtext-
User-definable text substituted for all occurrences of the
%Q% keyword in SCCS file text retrieved by
get(CP).
mmod-
Module name of the SCCS file substituted for all
occurrences of the %M% keyword in SCCS file text
retrieved by
get(CP).
If the m flag is not specified, the value assigned
is the name of the SCCS file with the leading
s. removed.
ttype-
Type of module in the SCCS file
substituted for all occurrences of %Y% keyword in
SCCS file text retrieved by
get(CP).
v[pgm]-
Causes
delta(CP)
to prompt for Modification
Request (MR) numbers as the reason for creating
a delta.
The optional value specifies the name of an MR
number validity checking program (see
delta(CP)).
(If this flag is set when creating an SCCS file,
the -m option must also be used even if its
value is null.)
x-
Causes get to create files with execute permissions.
-dflag-
Causes removal (deletion) of the specified flag
from an SCCS file.
The -d option may be specified only when
processing existing SCCS files.
The -d option may be specified several times
on a single admin command.
See the -f keyletter for allowable flag
names.
llist-
A list of releases to be ``unlocked''.
See the -f keyletter for a description of the
l flag and the syntax of a list.
-alogin-
A login name or numerical system group ID
to be added to the list of users which may make deltas
(changes) to the SCCS file.
A group ID is equivalent to specifying all
login names common to that group ID.
Several a keyletters may be used on a single
admin command line.
As many logins or numerical group IDs
as desired may be on the list simultaneously.
If the list of users is empty, then anyone may add deltas.
If login or group ID is preceded by a
``!'' it is to be denied permission to make deltas.
-elogin-
A login name or numerical group ID
to be erased from the list of users allowed to make deltas
(changes) to the SCCS file.
Specifying a group ID is equivalent to specifying all
login names common to that group ID.
Several e keyletters may be used on a single
admin command line.
-m[mrlist]-
The list of Modification Requests (MR) numbers is
inserted into the SCCS file as the reason for creating
the initial delta in a manner identical to
delta(CP).
The v flag must be set; the MR numbers are
validated if the v flag has a value (the name of
an MR number validation program).
Diagnostics will occur if the v flag is not set or
MR validation fails.
-y[comment]-
The comment text is inserted into the
SCCS file as a comment for the initial delta
in a manner identical to that of
delta(CP).
Omission of the -y keyletter results in a default
comment line being inserted in the form:
date and time created YY/MM/DD HH:MM:SS by login
The -y keyletter is valid only if the
-i and/or -n keyletters are
specified (that is, a new SCCS file is being
created).
-h-
Causes admin to check the structure of the
SCCS file and to compare a newly computed
check-sum (the sum of all the characters in the
SCCS file except those in the first line)
with the check-sum that is stored in the first line of
the SCCS file.
Appropriate error diagnostics are produced.
This keyletter inhibits writing on the file, so that it
nullifies the effect of any other keyletters supplied, and
is, therefore, only meaningful when processing existing files.
-z-
The SCCS file check-sum is recomputed and stored in
the first line of the SCCS file (see -h,
above).
Note that use of this keyletter on a corrupted file
may prevent future detection of the corruption.
Notes
The number of lines in the input file may not exceed 99999.
The last component of all SCCS file names must be
of the form s.filename.
New SCCS files are created in read-only mode.
Write permission in the directory is required to create a file.
All writing done by admin is to a temporary x-file,
called x.filename (see
get(CP))
created in read-only mode if creating a new SCCS file,
or with the same mode as the SCCS file if it exists.
After successful execution of admin, the
SCCS file is removed (if it exists), and the x-file
is renamed with the name of the SCCS file.
This ensures that changes are made to the SCCS file
only if no errors occurred.
We recommend that directories containing SCCS
files be writable only by the owner,
and that SCCS files themselves be read-only.
This will ensure that only the owner can modify the files,
and prevents any modification at all except by SCCS commands.
If it should be necessary to patch an SCCS file for
any reason, the mode may be changed by the owner.
Care must be taken!
The edited file should always be processed by an
admin -h to check for corruption followed by an
admin -z to generate a proper check-sum.
Another admin -h is recommended to ensure the
SCCS file is valid.
The admin command also makes use of a transient
lock file (called z.filename), which is used to
prevent simultaneous updates to the SCCS file by
different users.
See
get(CP)
for further information.
Files
d-file-
Created during the execution of delta; removed
after completion of delta.
g-file-
Existed before the execution of delta; removed
after completion of delta.
p-file-
Existed before the execution of delta; may exist
after completion of delta.
q-file-
Created during the execution of delta; removed
after completion of delta.
x-file-
Created during the execution of delta; renamed to
SCCS file after completion of delta.
z-file-
Created during the execution of delta; removed
during the execution of delta.
/usr/bin/bdiff-
Program to compute differences between the ``gotten'' file
and the g-file.
See also
delta(CP),
ed(C),
get(CP),
prs(CP),
sccsfile(FP),
what(CP)
Standards conformance
admin is conformant with:
X/Open Portability Guide, Issue 3, 1989
.
© 2003 Commands for Programming (CP)
SCO OpenServer Release 5.0.7 -- 11 February 2003