⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 batch.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>batch</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_000_134">&nbsp;</a>NAME</h4><blockquote>batch - execute commands when the system load permits</blockquote><h4><a name = "tag_000_000_135">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code><p><i>batch</i></code></blockquote><h4><a name = "tag_000_000_136">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>batch</i>utility reads commands to be executed at a later time.It is the equivalent of the command:<pre><code>at -q b -m now</code></pre>where queuebis a special<i><a href="at.html">at</a></i>queue, specifically for batch jobs.Batch jobs will be submitted to the batch queue with notime constraints and run by the system using algorithms,based on unspecified factors, that may vary with eachinvocation of<i>batch</i>.<p>Users are permitted to use<i>batch</i>if their name appears in the file<b>/usr/lib/cron/at.allow</b>.If that file does not exist, the file<b>/usr/lib/cron/at.deny</b>.is checked to determine if the usershould be denied access to<i>batch</i>.If neither file exists, only a process with the appropriate privileges isallowed tosubmit a job.If only<b>at.deny</b.exists and is empty, global usage is permitted.The<b>at.allow</b>and<b>at.deny</b>files consist of one user name per line.</blockquote><h4><a name = "tag_000_000_137">&nbsp;</a>OPTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_138">&nbsp;</a>OPERANDS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_139">&nbsp;</a>STDIN</h4><blockquote>The standard input must bea text file consisting of commands acceptable to theshell command language described in<xref href=shell><a href="chap2.html#tag_001">Shell Command Language</a></xref>.The standard input will only be used if no<b>-f</b>&nbsp;<i>file</i>option is specified.</blockquote><h4><a name = "tag_000_000_140">&nbsp;</a>INPUT FILES</h4><blockquote>The text files<b>/usr/lib/cron/at.allow</b>and<b>/usr/lib/cron/at.deny</b>contain user names, one per line, of users who are, respectively,authorised or denied access to the<i><a href="at.html">at</a></i>and<i>batch</i>utilities.</blockquote><h4><a name = "tag_000_000_141">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>batch</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 errorand informative messages written to standard output.<dt><i>LC_TIME</i><dd>Determine the format and contents for date and time strings written by<i>batch</i>.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i><dt><i>SHELL</i><dd>Determine the nameof a command interpreter to be used to invoke the at-job.If the variable is unset or null,<i><a href="sh.html">sh</a></i>will be used.If it is set to a value other than a name for<i><a href="sh.html">sh</a></i>,the implementation will do one of the following:use that shell;use<i><a href="sh.html">sh</a></i>;use the login shell from the user database;any of the preceding accompanied by awarning diagnostic about which was chosen.<dt><i>TZ</i><dd>Determine the timezone.The job will be submitted for execution at thetime specified by<i>timespec</i>or<b>-t</b>&nbsp;<i>time</i>relative to the timezone specified by the<i>TZ</i>variable.If<i>timespec</i>specifies a timezone, it will override<i>TZ .</i>If<i>timespec</i>does not specify a timezone and<i>TZ</i>is unset or null, an unspecified default timezone will be used.</dl></blockquote><h4><a name = "tag_000_000_142">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_000_000_143">&nbsp;</a>STDOUT</h4><blockquote>When standard input is a terminal, prompts of unspecifiedformat for each line of the user input described inthe STDIN section may be written to standard output.<p>In the POSIX locale,the following will be written to the standard outputfor each job when jobs are listed in response to the<b>-l</b>option:<code><p><tt>"%s\t%s\n"</tt>, <i>at_job_id</i>,&lt;<i>date</i>&gt;</code>where&lt;<i>date</i>&gt;is equivalent in format to the output of:<pre><code>date +"%a %b %e %T %Y"</code></pre><p>The date and time written will be adjusted sothat they appear in the timezone of the user (asdetermined by the<i>TZ</i>variable).</blockquote><h4><a name = "tag_000_000_144">&nbsp;</a>STDERR</h4><blockquote>The following will be written to standard errorwhen a job has been successfully submitted:<p><code><tt>"job %s at %s\n"</tt>, <i>at_job_id</i>,&lt;<i>date</i>&gt;</code>where&lt;<i>date</i>&gt;will have the same format as is described in the STDOUT section.Neither this, nor warning messages concerning the selectionof the command interpreter, are considered a diagnosticthat changes the exit status.<p>Diagnostic messages, if any, are written to standard error.</blockquote><h4><a name = "tag_000_000_145">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_146">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_147">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_000_000_148">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>The job will not be scheduled.</blockquote><h4><a name = "tag_000_000_149">&nbsp;</a>APPLICATION USAGE</h4><blockquote>It may be useful to redirect standard output within the specified commands.</blockquote><h4><a name = "tag_000_000_150">&nbsp;</a>EXAMPLES</h4><blockquote><ol><p><li>This sequence can be used at a terminal:<pre><code>batchsort &lt; file &gt;outfileEOT</code></pre><p><li>This sequence, which demonstrates redirecting standarderror to a pipe, is useful in a command procedure (the sequence ofoutput redirection specifications is significant):<pre><code>batch &lt;&lt;!diff file1 file2 2&gt;&amp;1 &gt;outfile | mailx mygroup!</code></pre><p></ol></blockquote><h4><a name = "tag_000_000_151">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_152">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="at.html">at</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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 + -