📄 val.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>val</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_2790"> </a>NAME</h4><blockquote>val - validate SCCS files (<b>DEVELOPMENT</b>)</blockquote><h4><a name = "tag_001_014_2791"> </a>SYNOPSIS</h4><blockquote><pre><code>val -val <b>[</b>-s<b>][</b>-m <i>name</i><b>][</b>-r <i>SID</i><b>][</b>-y <i>type</i><b>]</b><i> file</i>...</code></pre></blockquote><h4><a name = "tag_001_014_2792"> </a>DESCRIPTION</h4><blockquote>The<i>val</i>utility determines if the specified<i>file</i>is an SCCS file meeting the characteristics specifiedby the options.<p></blockquote><h4><a name = "tag_001_014_2793"> </a>OPTIONS</h4><blockquote>The<i>val</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b> </a> ,except that the usage of the - operandis not strictly as intended by the guidelines(that is, reading options and operands from standard input).The following options are supported:<dl compact><dt><b>-m </b><i>name</i><dd>Specify a<i>name</i>,which is compared with the SCCS<b>%M%</b>keyword in<i>file</i>.(See<i><a href="get.html">get</a></i>).<dt><b>-r </b><i>SID</i><dd>Specify a<i>SID</i>(SCCS Identification String),an SCCS delta number.A check is made to determine if the<i>SID</i>is ambiguous (for example,<b>-r</b>1is ambiguous because it physically does not exist but implies 1.1,1.2, and so on, which may exist) or invalid (for example,<b>-r</b>1.0or<b>-r</b>1.1.0are invalid because neither case can exist as a valid delta number).If the<i>SID</i>is valid and not ambiguous, a check is madeto determine if it actually exists.<dt><b>-s</b><dd>Silence the diagnostic message normallywritten to standard output for anyerror that is detected while processing each named file ona given command line.<dt><b>-y </b><i>type</i><dd>Specify a<i>type</i>,which is compared with the SCCS<b>%Y%</b>keyword in<i>file</i>.(See<i><a href="get.html">get</a></i>).</dl><br></blockquote><h4><a name = "tag_001_014_2794"> </a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>file</i><dd>A pathname of an existing SCCS file.If a single instance<i>file</i>is specified as -,and if no options are specified,the standard input is read:each line is independently processed as if it were acommand-line argument list.(However, the line is not subjected to any of the shellword expansions, such as parameter expansion or quote removal.)</dl></blockquote><h4><a name = "tag_001_014_2795"> </a>STDIN</h4><blockquote>The standard input is a text file used only when the<i>file</i>operand is specified as -.</blockquote><h4><a name = "tag_001_014_2796"> </a>INPUT FILES</h4><blockquote>Any SCCS files processed are files of an unspecified format.</blockquote><h4><a name = "tag_001_014_2797"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>val</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.and informative messages written to standard output.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_2798"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2799"> </a>STDOUT</h4><blockquote>The standard output consists of informative messagesabout either:(1) each file processed, or;(2) each command line read from standard input.<p>If the standard input is not used, for each<i>file</i>operand yielding a discrepancy,the output line has the following format:<p><code><tt>" %s: %s\n"</tt>, <<i>pathname</i>>,<<i>unspecified string</i>></code><p>If standard input is used,a line of input is written before each of the preceding linesfor files containing discrepancies:<p><code><tt>"%s:\n"</tt>, <<i>input line</i>></code></blockquote><h4><a name = "tag_001_014_2800"> </a>STDERR</h4><blockquote>Not used.</blockquote><h4><a name = "tag_001_014_2801"> </a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2802"> </a>EXTENDED DESCRIPTION</h4><blockquote>None.<br></blockquote><h4><a name = "tag_001_014_2803"> </a>EXIT STATUS</h4><blockquote>The 8-bit code returned by<i>val</i>is adisjunction of the possible errors, that is, it can be interpreted asa bit string whereset bits are interpreted as follows:<p><table <tr valign=top><th align=left>0x80<th align=left>=<th align=left>Missing file argument.<tr valign=top><td align=left>0x40<td align=left>=<td align=left>Unknown or duplicate option.<tr valign=top><td align=left>0x20<td align=left>=<td align=left>Corrupted SCCS file.<tr valign=top><td align=left>0x10<td align=left>=<td align=left>Cannot open file or file not SCCS.<tr valign=top><td align=left>0x08<td align=left>=<td align=left><i>SID</i> is invalid or ambiguous.<tr valign=top><td align=left>0x04<td align=left>=<td align=left><i>SID</i> does not exist.<tr valign=top><td align=left>0x02<td align=left>=<td align=left><b>%Y%</b>, <b>-y</b> mismatch.<tr valign=top><td align=left>0x01<td align=left>=<td align=left><b>%M%</b>, <b>-m</b> mismatch.</table><p>Note that<i>val</i>can process two or more files on a given command line and canprocess multiple command lines (when reading the standard input).In these cases an aggregate code is returned:a logical ORof the codes generated for each command line and file processed.</blockquote><h4><a name = "tag_001_014_2804"> </a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2805"> </a>APPLICATION USAGE</h4><blockquote>Since the<i>val</i>exit status sets the 0x80 bit, shell applications checking$?cannot tell if it terminated due to a missing file argument orreceipt of a signal.</blockquote><h4><a name = "tag_001_014_2806"> </a>EXAMPLES</h4><blockquote>In a directory with three SCCS files,<b>s.x</b>(of<b>t</b>type "text"),<b>s.y</b>and<b>s.z</b>(a corrupted file),the following command could produce the output shown:<pre><code>val - <<EOF-y source s.x-m y s.ys.zEOF-y source s.x s.x: %Y%, -y mismatchs.z s.z: corrupted SCCS file</code></pre><p></blockquote><h4><a name = "tag_001_014_2807"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2808"> </a>SEE ALSO</h4><blockquote><i><a href="admin.html">admin</a></i>,<i><a href="delta.html">delta</a></i>,<i><a href="get.html">get</a></i>,<i><a href="prs.html">prs</a></i>.<br></blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -