1VAL(1P) POSIX Programmer's Manual VAL(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 val - validate SCCS files (DEVELOPMENT)
13
15 val -
16
17 val [-s][-m name][-r SID][-y type] file...
18
19
21 The val utility shall determine whether the specified file is an SCCS
22 file meeting the characteristics specified by the options.
23
25 The val utility shall conform to the Base Definitions volume of
26 IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines, except
27 that the usage of the '-' operand is not strictly as intended by the
28 guidelines (that is, reading options and operands from standard input).
29
30 The following options shall be supported:
31
32 -m name
33 Specify a name, which is compared with the SCCS %M% keyword in
34 file; see get .
35
36 -r SID
37 Specify a SID (SCCS Identification String), an SCCS delta num‐
38 ber. A check shall be made to determine whether the SID is
39 ambiguous (for example, -r 1 is ambiguous because it physically
40 does not exist but implies 1.1, 1.2, and so on, which may exist)
41 or invalid (for example, -r 1.0 or -r 1.1.0 are invalid because
42 neither case can exist as a valid delta number). If the SID is
43 valid and not ambiguous, a check shall be made to determine
44 whether it actually exists.
45
46 -s Silence the diagnostic message normally written to standard out‐
47 put for any error that is detected while processing each named
48 file on a given command line.
49
50 -y type
51 Specify a type, which shall be compared with the SCCS %Y% key‐
52 word in file; see get .
53
54
56 The following operands shall be supported:
57
58 file A pathname of an existing SCCS file. If exactly one file operand
59 appears, and it is '-', the standard input shall be read: each
60 line shall be independently processed as if it were a command
61 line argument list. (However, the line is not subjected to any
62 of the shell word expansions, such as parameter expansion or
63 quote removal.)
64
65
67 The standard input shall be a text file used only when the file operand
68 is specified as '-' .
69
71 Any SCCS files processed shall be files of an unspecified format.
72
74 The following environment variables shall affect the execution of val:
75
76 LANG Provide a default value for the internationalization variables
77 that are unset or null. (See the Base Definitions volume of
78 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
79 ables for the precedence of internationalization variables used
80 to determine the values of locale categories.)
81
82 LC_ALL If set to a non-empty string value, override the values of all
83 the other internationalization variables.
84
85 LC_CTYPE
86 Determine the locale for the interpretation of sequences of
87 bytes of text data as characters (for example, single-byte as
88 opposed to multi-byte characters in arguments and input files).
89
90 LC_MESSAGES
91 Determine the locale that should be used to affect the format
92 and contents of diagnostic messages written to standard error,
93 and informative messages written to standard output.
94
95 NLSPATH
96 Determine the location of message catalogs for the processing of
97 LC_MESSAGES .
98
99
101 Default.
102
104 The standard output shall consist of informative messages about either:
105
106 1. Each file processed
107
108 2. Each command line read from standard input
109
110 If the standard input is not used, for each file operand yielding a
111 discrepancy, the output line shall have the following format:
112
113
114 "%s: %s\n", <pathname>, <unspecified string>
115
116 If standard input is used, a line of input shall be written before each
117 of the preceding lines for files containing discrepancies:
118
119
120 "%s:\n", <input line>
121
123 Not used.
124
126 None.
127
129 None.
130
132 The 8-bit code returned by val shall be a disjunction of the possible
133 errors; that is, it can be interpreted as a bit string where set bits
134 are interpreted as follows:
135
136
137 0x80 ───── Missing file argument.
138 0x40 ───── Unknown or duplicate option.
139 0x20 ───── Corrupted SCCS file.
140 0x10 ───── Cannot open file or file not SCCS.
141 0x08 ───── SID is invalid or ambiguous.
142 0x04 ───── SID does not exist.
143 0x02 ───── %Y%, -y mismatch.
144 0x01 ───── %M%, -m mismatch.
145
146 Note that val can process two or more files on a given command line and
147 can process multiple command lines (when reading the standard input).
148 In these cases an aggregate code shall be returned: a logical OR of the
149 codes generated for each command line and file processed.
150
152 Default.
153
154 The following sections are informative.
155
157 Since the val exit status sets the 0x80 bit, shell applications check‐
158 ing "$?" cannot tell if it terminated due to a missing file argument or
159 receipt of a signal.
160
162 In a directory with three SCCS files- s.x (of t type "text"), s.y, and
163 s.z (a corrupted file)-the following command could produce the output
164 shown:
165
166
167 val - <<EOF
168 -y source s.x
169 -m y s.y
170 s.z
171 EOF
172
173
174 -y source s.x
175
176
177 s.x: %Y%, -y mismatch
178 s.z
179
180
181 s.z: corrupted SCCS file
182
184 None.
185
187 None.
188
190 admin, delta, get, prs
191
193 Portions of this text are reprinted and reproduced in electronic form
194 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
195 -- Portable Operating System Interface (POSIX), The Open Group Base
196 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
197 Electrical and Electronics Engineers, Inc and The Open Group. In the
198 event of any discrepancy between this version and the original IEEE and
199 The Open Group Standard, the original IEEE and The Open Group Standard
200 is the referee document. The original Standard can be obtained online
201 at http://www.opengroup.org/unix/online.html .
202
203
204
205IEEE/The Open Group 2003 VAL(1P)