3.5.4 Keyword Substitution
Keyword substitution is performed unless the -k option or the
-e option is given to
what contains a keyword substitution example.
The keywords are all of the form ‘%x%’ where x stands for
an upper-case letter, one of:
- Expands to the same as ‘%Z% %Y% %M% %I% %Z%’.
- The branch number of the gotten version
- Current line in the output file
- The date at the time the file was gotten, in the form yy/mm/dd. The
year is always represented as two digits but this is not ambiguous since
the two-digit year is no later than 2068 (see Year 2000 Issues).
- The date that the newest delta in the gotten file was applied,
yy/mm/dd. The year is always represented as two digits but this is
not ambiguous since the two-digit year is no later than 2068
(see Year 2000 Issues).
- Name of the sccs file, for example ‘s.foo.c’.
- As for %E%, but in the US format mm/dd/yy.
- As for %D%, but in the US format mm/dd/yy.
- Expands to the same as %R%.%L%.%B%.%S%, that is, the sid of the
- The level number of the retrieved version.
- Module name: the value of the
m (module) flag, or the base name
of the sccs file with the s. removed if the module flag is
- Full name of the sccs file.
- Value of the
q flag. The
q flag has no other purpose, and
can be set with ‘admin -fqfoo’. See Flags.
- Release number of the retrieved version.
- Sequence number of the retrieved version.
- Current time (hh:mm:ss) when the file was retrieved, see %D% and %H%.
- Expands to %Z% %M% <tab> %I% or the argument for the -w
flag, if given.
- Value of the
t (module type) flag.
- The literal string
@(#). See what.
Some of the keywords listed above have expansions that are described
in terms of the contents of other keywords. This expansion is
performed as if the ‘y’ flag in the sccs file is not set.
For example, ‘admin -fyA’ will cause the ‘%I%’ keyword not
to be expanded, but the ‘%A%’ keyword is still fully expanded,
even though it is defined in terms of ‘%I%’.