1GET(P)                     POSIX Programmer's Manual                    GET(P)
2
3
4

NAME

6       get - get a version of an SCCS file (DEVELOPMENT)
7

SYNOPSIS

9       get [-begkmnlLpst][-c cutoff][-i list][-r SID][-x list] file...
10

DESCRIPTION

12       The  get  utility  shall generate a text file from each named SCCS file
13       according to the specifications given by its options.
14
15       The generated text shall normally be written into a file called the  g-
16       file  whose  name  is derived from the SCCS filename by simply removing
17       the leading "s." .
18

OPTIONS

20       The get utility  shall  conform  to  the  Base  Definitions  volume  of
21       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
22
23       The following options shall be supported:
24
25       -r  SID
26              Indicate  the  SCCS  Identification  String (SID) of the version
27              (delta) of an SCCS file to be retrieved. The  table  shows,  for
28              the most useful cases, what version of an SCCS file is retrieved
29              (as well as the SID of the version to be eventually  created  by
30              delta  if  the -e option is also used), as a function of the SID
31              specified.
32
33       -c  cutoff
34              Indicate the cutoff date-time, in the form:
35
36
37              YY[MM[DD[HH[MM[SS]]]]]
38
39       For the YY component, values in the range [69,99] shall refer to  years
40       1969  to 1999 inclusive, and values in the range [00,68] shall refer to
41       years 2000 to 2068 inclusive.
42
43       Note:
44              It is expected that in a future version of  IEEE Std 1003.1-2001
45              the  default  century  inferred from a 2-digit year will change.
46              (This would apply to all commands accepting a  2-digit  year  as
47              input.)
48
49
50       No changes (deltas) to the SCCS file that were created after the speci‐
51       fied cutoff date-time shall be included in  the  generated  text  file.
52       Units omitted from the date-time default to their maximum possible val‐
53       ues; for example, -c 7502 is equivalent to -c 750228235959.
54
55       Any number of non-numeric characters may separate the  various  2-digit
56       pieces of the cutoff date-time. This feature allows the user to specify
57       a cutoff date in the form: -c "77/2/2 9:22:25".
58
59       -e     Indicate that the get is for the purpose of editing or making  a
60              change  (delta)  to the SCCS file via a subsequent use of delta.
61              The -e option used in a get for a particular  version  (SID)  of
62              the SCCS file shall prevent further get commands from editing on
63              the same SID until delta is executed or the j (joint edit)  flag
64              is  set in the SCCS file. Concurrent use of get -e for different
65              SIDs is always allowed.
66
67       If the g-file generated by get with a -e option is accidentally  ruined
68       in  the  process  of editing, it may be regenerated by re-executing the
69       get command with the -k option in place of the -e option.
70
71       SCCS file protection specified via the ceiling, floor,  and  authorized
72       user  list stored in the SCCS file shall be enforced when the -e option
73       is used.
74
75       -b     Use with the -e option to indicate that  the  new  delta  should
76              have  an  SID in a new branch as shown in the table below.  This
77              option shall be ignored if the b flag is not present in the file
78              or  if the retrieved delta is not a leaf delta. (A leaf delta is
79              one that has no successors on the SCCS file tree.)
80
81       Note:
82              A branch delta may always be created from a non-leaf delta.
83
84
85       -i  list
86              Indicate a list of deltas to be included (forced to be  applied)
87              in  the creation of the generated file. The list has the follow‐
88              ing syntax:
89
90
91              <list> ::= <range> | <list> , <range>
92              <range> ::= SID | SID - SID
93
94       SID, the SCCS Identification of a delta, may be in any  form  shown  in
95       the  "SID  Specified"  column  of the table in the EXTENDED DESCRIPTION
96       section, except that the result of supplying a partial SID is  unspeci‐
97       fied.  A  diagnostic  message  shall be written if the first SID in the
98       range is not an ancestor of the second SID in the range.
99
100       -x  list
101              Indicate a list of deltas to  be  excluded  (forced  not  to  be
102              applied)  in  the  creation  of  the  generated file. See the -i
103              option for the list format.
104
105       -k     Suppress replacement of identification keywords (see  below)  in
106              the  retrieved  text  by  their  value.  The  -k option shall be
107              implied by the -e option.
108
109       -l     Write a delta summary into an l-file.
110
111       -L     Write a delta summary to standard output. All informative output
112              that  normally is written to standard output shall be written to
113              standard error instead, unless the -s option is used,  in  which
114              case it shall be suppressed.
115
116       -p     Write the text retrieved from the SCCS file to the standard out‐
117              put.  No g-file shall be created. All  informative  output  that
118              normally  goes to the standard output shall go to standard error
119              instead, unless the -s option is used, in which  case  it  shall
120              disappear.
121
122       -s     Suppress  all  informative  output  normally written to standard
123              output.  However, fatal error messages (which  shall  always  be
124              written to the standard error) shall remain unaffected.
125
126       -m     Precede  each  text line retrieved from the SCCS file by the SID
127              of the delta that inserted the text line in the SCCS  file.  The
128              format shall be:
129
130
131              "%s\t%s", <SID>, <text line>
132
133       -n     Precede  each  generated  text  line with the %M% identification
134              keyword value (see below). The format shall be:
135
136
137              "%s\t%s", <%M% value>, <text line>
138
139       When both the -m and -n options are  used,  the  <text line>  shall  be
140       replaced by the -m option-generated format.
141
142       -g     Suppress  the actual retrieval of text from the SCCS file. It is
143              primarily used to generate an l-file, or to verify the existence
144              of a particular SID.
145
146       -t     Use  to  access the most recently created (top) delta in a given
147              release (for example, -r 1), or release and level (for  example,
148              -r 1.2).
149
150

OPERANDS

152       The following operands shall be supported:
153
154       file   A pathname of an existing SCCS file or a directory. If file is a
155              directory, the get utility shall behave as though each  file  in
156              the  directory  were specified as a named file, except that non-
157              SCCS files (last component of the pathname does not  begin  with
158              s.) and unreadable files shall be silently ignored.
159
160       If exactly one file operand appears, and it is '-' , the standard input
161       shall be read; each line of the standard input is taken to be the  name
162       of  an  SCCS  file to be processed. Non-SCCS files and unreadable files
163       shall be silently ignored.
164
165

STDIN

167       The standard input shall be a text file used only if the  file  operand
168       is  specified  as '-' . Each line of the text file shall be interpreted
169       as an SCCS pathname.
170

INPUT FILES

172       The SCCS files shall be files of an unspecified format.
173

ENVIRONMENT VARIABLES

175       The following environment variables shall affect the execution of get:
176
177       LANG   Provide a default value for the  internationalization  variables
178              that  are  unset  or  null.  (See the Base Definitions volume of
179              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
180              ables  for the precedence of internationalization variables used
181              to determine the values of locale categories.)
182
183       LC_ALL If set to a non-empty string value, override the values  of  all
184              the other internationalization variables.
185
186       LC_CTYPE
187              Determine  the  locale  for  the  interpretation of sequences of
188              bytes of text data as characters (for  example,  single-byte  as
189              opposed to multi-byte characters in arguments and input files).
190
191       LC_MESSAGES
192              Determine  the  locale  that should be used to affect the format
193              and contents of diagnostic messages written to  standard  error,
194              and informative messages written to standard output (or standard
195              error, if the -p option is used).
196
197       NLSPATH
198              Determine the location of message catalogs for the processing of
199              LC_MESSAGES .
200
201       TZ     Determine  the  timezone in which the times and dates written in
202              the SCCS file are evaluated. If the  TZ  variable  is  unset  or
203              NULL, an unspecified system default timezone is used.
204
205

ASYNCHRONOUS EVENTS

207       Default.
208

STDOUT

210       For  each  file  processed,  get shall write to standard output the SID
211       being accessed and the number of lines retrieved from the SCCS file, in
212       the following format:
213
214
215              "%s\n%d lines\n", <SID>, <number of lines>
216
217       If  the -e option is used, the SID of the delta to be made shall appear
218       after the SID accessed and before the number of lines generated, in the
219       POSIX locale:
220
221
222              "%s\nnew delta %s\n%d lines\n", <SID accessed>,
223                  <SID to be made>, <number of lines>
224
225       If  there  is  more  than  one named file or if a directory or standard
226       input is named, each pathname shall be written before each of the lines
227       shown in one of the preceding formats:
228
229
230              "\n%s:\n", <pathname>
231
232       If  the  -L  option is used, a delta summary shall be written following
233       the format specified below for l-files.
234
235       If the -i option is used, included deltas shall be listed following the
236       notation, in the POSIX locale:
237
238
239              "Included:\n"
240
241       If the -x option is used, excluded deltas shall be listed following the
242       notation, in the POSIX locale:
243
244
245              "Excluded:\n"
246
247       If the -p or -L options are specified, the standard output  shall  con‐
248       sist of the text retrieved from the SCCS file.
249

STDERR

251       The  standard  error shall be used only for diagnostic messages, except
252       if the -p or -L options are specified, it shall include all informative
253       messages normally sent to standard output.
254

OUTPUT FILES

256       Several  auxiliary  files  may be created by get. These files are known
257       generically as the g-file,  l-file,  p-file,  and  z-file.  The  letter
258       before  the  hyphen  is  called the tag. An auxiliary filename shall be
259       formed from the SCCS filename: the application shall  ensure  that  the
260       last  component  of  all SCCS filenames is of the form s.  module-name;
261       the auxiliary files shall be named by replacing the leading s with  the
262       tag.  The  g-file  shall  be an exception to this scheme: the g-file is
263       named by removing the s. prefix. For example, for s.xyz.c,  the  auxil‐
264       iary  filenames  would be xyz.c, l.xyz.c, p.xyz.c, and z.xyz.c, respec‐
265       tively.
266
267       The g-file, which contains the generated text, shall be created in  the
268       current  directory  (unless  the  -p option is used). A g-file shall be
269       created in all cases, whether or not any lines of text  were  generated
270       by  the  get.  It  shall be owned by the real user. If the -k option is
271       used or implied, the g-file shall be writable by the owner only  (read-
272       only  for  everyone  else);  otherwise, it shall be read-only. Only the
273       real user need have write permission in the current directory.
274
275       The l-file shall contain a table showing which deltas were  applied  in
276       generating  the retrieved text. The l-file shall be created in the cur‐
277       rent directory if the -l option is used; it shall be read-only  and  it
278       is  owned by the real user.  Only the real user need have write permis‐
279       sion in the current directory.
280
281       Lines in the l-file shall have the following format:
282
283
284              "%c%c%c %s\t%s %s\n", <code1>, <code2>, <code3>,
285                  <SID>, <date-time>, <login>
286
287       where the entries are:
288
289       <code1>
290              A <space> if the delta was applied; '*' otherwise.
291
292       <code2>
293              A <space> if the delta  was  applied  or  was  not  applied  and
294              ignored; '*' if the delta was not applied and was not ignored.
295
296       <code3>
297              A character indicating a special reason why the delta was or was
298              not applied:
299
300       I
301              Included.
302
303       X
304              Excluded.
305
306       C
307              Cut off (by a -c option).
308
309
310       <date-time>
311              Date and time (using the format of the date utility's %y / %m  /
312              %d %T conversion specification format) of creation.
313
314       <login>
315              Login name of person who created delta.
316
317
318       The comments and MR data shall follow on subsequent lines, indented one
319       <tab>. A blank line shall terminate each entry.
320
321       The p-file shall be used to pass information resulting from a get  with
322       a  -e option along to delta. Its contents shall also be used to prevent
323       a subsequent execution of get with a -e option for the same  SID  until
324       delta  is  executed or the joint edit flag, j, is set in the SCCS file.
325       The p-file shall be created in the directory containing the  SCCS  file
326       and the application shall ensure that the effective user has write per‐
327       mission in that directory. It shall be  writable  by  owner  only,  and
328       owned  by  the  effective  user. Each line in the p-file shall have the
329       following format:
330
331
332              "%s %s %s %s%s%s\n", <g-file SID>,
333                  <SID of new delta>, <login-name of real user>,
334                  <date-time>, <i-value>, <x-value>
335
336       where <i-value> uses the format "" if no -i option was  specified,  and
337       shall use the format:
338
339
340              " -i%s", <-i option option-argument>
341
342       if  a -i option was specified and <x-value> uses the format "" if no -x
343       option was specified, and shall use the format:
344
345
346              " -x%s", <-x option option-argument>
347
348       if a -x option was specified. There can be an arbitrary number of lines
349       in  the  p-file at any time; no two lines shall have the same new delta
350       SID.
351
352       The z-file shall serve as a  lock-out  mechanism  against  simultaneous
353       updates.  Its  contents  shall  be the binary process ID of the command
354       (that is, get) that created it. The z-file  shall  be  created  in  the
355       directory  containing  the  SCCS file for the duration of get. The same
356       protection restrictions as those for the p-file shall apply for the  z-
357       file.  The z-file shall be created read-only.
358

EXTENDED DESCRIPTION

360                    Determination of SCCS Identification String
361       SID*      -b Keyletter Other                  SID       SID of Delta
362       Specified Used&        Conditions             Retrieved to be Created
363       none&&    no           R defaults to mR       mR.mL     mR.(mL+1)
364       none&&    yes          R defaults to mR       mR.mL     mR.mL.(mB+1).1
365       R         no           R > mR                 mR.mL     R.1***
366       R         no           R = mR                 mR.mL     mR.(mL+1)
367       R         yes          R > mR                 mR.mL     mR.mL.(mB+1).1
368       R         yes          R = mR                 mR.mL     mR.mL.(mB+1).1
369       R         -            R < mR and R does not  hR.mL**   hR.mL.(mB+1).1
370                              exist
371       R         -            Trunk successor in     R.mL      R.mL.(mB+1).1
372                              release > R and R
373                              exists
374       R.L       no           No trunk successor     R.L       R.(L+1)
375       R.L       yes          No trunk successor     R.L       R.L.(mB+1).1
376       R.L       -            Trunk successor in     R.L       R.L.(mB+1).1
377                              release >= R
378       R.L.B     no           No branch successor    R.L.B.mS  R.L.B.(mS+1)
379       R.L.B     yes          No branch successor    R.L.B.mS  R.L.(mB+1).1
380       R.L.B.S   no           No branch successor    R.L.B.S   R.L.B.(S+1)
381       R.L.B.S   yes          No branch successor    R.L.B.S   R.L.(mB+1).1
382       R.L.B.S   -            Branch successor       R.L.B.S   R.L.(mB+1).1
383
384       *      R, L, B, and S are the release, level, branch, and sequence com‐
385              ponents of the SID, respectively; m  means  maximum.  Thus,  for
386              example,  R.mL  means  "the  maximum level number within release
387              R''; R.L.(mB+1).1 means "the first sequence number  on  the  new
388              branch  (that  is,  maximum  branch  number plus one) of level L
389              within release R". Note that if the SID specified is of the form
390              R.L,  R.L.B,  or R.L.B.S, each of the specified components shall
391              exist.
392
393       **     hR is the highest existing release that is lower than the speci‐
394              fied, nonexistent, release R.
395
396       ***    This  is  used  to  force  creation  of the first delta in a new
397              release.
398
399       &      The -b option is effective only if the b flag is present in  the
400              file. An entry of '-' means "irrelevant".
401
402       &&     This  case applies if the d (default SID) flag is not present in
403              the file. If the d flag is present in the  file,  then  the  SID
404              obtained from the d flag is interpreted as if it had been speci‐
405              fied on the command line. Thus, one of the other cases  in  this
406              table applies.
407
408
409   System Date and Time
410       When  a  g-file  is  generated, the creation time of deltas in the SCCS
411       file may be taken into account. If any of these times are apparently in
412       the future, the behavior is unspecified.
413
414   Identification Keywords
415       Identifying  information shall be inserted into the text retrieved from
416       the SCCS file by replacing identification  keywords  with  their  value
417       wherever  they  occur.  The  following keywords may be used in the text
418       stored in an SCCS file:
419
420       %M%    Module name: either the value of the m flag in the file,  or  if
421              absent, the name of the SCCS file with the leading s. removed.
422
423       %I%    SCCS  identification  (SID)  (%R%.%L% or %R%.%L%.%B%.%S%) of the
424              retrieved text.
425
426       %R%    Release.
427
428       %L%    Level.
429
430       %B%    Branch.
431
432       %S%    Sequence.
433
434       %D%    Current date (YY/MM/DD).
435
436       %H%    Current date (MM/DD/YY).
437
438       %T%    Current time (HH:MM:SS).
439
440       %E%    Date newest applied delta was created (YY/MM/DD).
441
442       %G%    Date newest applied delta was created (MM/DD/YY).
443
444       %U%    Time newest applied delta was created (HH:MM:SS).
445
446       %Y%    Module type: value of the t flag in the SCCS file.
447
448       %F%    SCCS filename.
449
450       %P%    SCCS absolute pathname.
451
452       %Q%    The value of the q flag in the file.
453
454       %C%    Current line number. This keyword is  intended  for  identifying
455              messages  output  by  the program, such as "this should not have
456              happened" type errors. It is not intended to be  used  on  every
457              line to provide sequence numbers.
458
459       %Z%    The four-character string "@(#)" recognizable by what.
460
461       %W%    A shorthand notation for constructing what strings:
462
463
464              %W%=%Z%%M%<tab>%I%
465
466       %A%    Another shorthand notation for constructing what strings:
467
468
469              %A%=%Z%%Y%%M%%I%%Z%
470
471

EXIT STATUS

473       The following exit values shall be returned:
474
475        0     Successful completion.
476
477       >0     An error occurred.
478
479

CONSEQUENCES OF ERRORS

481       Default.
482
483       The following sections are informative.
484

APPLICATION USAGE

486       Problems  can arise if the system date and time have been modified (for
487       example, put forward and then  back  again,  or  unsynchronized  clocks
488       across  a  network)  and can also arise when different values of the TZ
489       environment variable are used.
490
491       Problems of a similar nature can also arise for the  operation  of  the
492       delta  utility, which compares the previous file body against the work‐
493       ing file as part of its normal operation.
494

EXAMPLES

496       None.
497

RATIONALE

499       None.
500

FUTURE DIRECTIONS

502       The -lp option may be withdrawn in a future version.
503

SEE ALSO

505       admin , delta , prs , what
506
508       Portions of this text are reprinted and reproduced in  electronic  form
509       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
510       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
511       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
512       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
513       event of any discrepancy between this version and the original IEEE and
514       The Open Group Standard, the original IEEE and The Open Group  Standard
515       is  the  referee document. The original Standard can be obtained online
516       at http://www.opengroup.org/unix/online.html .
517
518
519
520IEEE/The Open Group                  2003                               GET(P)
Impressum