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

📄 unexpand.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>unexpand</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_001_014_2524">&nbsp;</a>NAME</h4><blockquote>unexpand - convert spaces to tabs</blockquote><h4><a name = "tag_001_014_2525">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>unexpand <b>[</b> -a| -t <i>tablist</i><b>][</b><i>file</i>...<b>]</b></code></pre></blockquote><h4><a name = "tag_001_014_2526">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>unexpand</i>utilitycopies files or standard input to standard output,convertingblank charactersat the beginning of each line into the maximum number oftab charactersfollowed by the minimum number ofspace charactersneeded to fill the samecolumn positions originally filled by the translatedblank characters.By default, tabstops are set at every eighth column position.Eachbackspacecharacter is copied to the output, and causes thecolumn position count for tab calculations to be decremented;the count willnever be decremented to a value less than one.</blockquote><h4><a name = "tag_001_014_2527">&nbsp;</a>OPTIONS</h4><blockquote>The<i>unexpand</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> .<p>The following option is supported:<dl compact><dt><b>-a</b><dd>In addition to translatingblank charactersat the beginning of each line, translateall sequences of two or moreblank charactersimmediately preceding a tab stop to themaximum number oftab charactersfollowed by the minimum number ofspace charactersneeded tofill the same column positions originallyfilled by the translatedblank characters.<dt><b>-t&nbsp;</b><i>tablist</i><dd>Specify the tab stops.The option-argument<i>tablist</i>must be a single argumentconsisting of a single positive decimal integer or multiplepositive decimal integers,separated byblank charactersor commas, in ascending order.If a single number is given, tabs will be set<i>tablist</i>column positions apart instead of the default 8.If multiple numbers are given,the tabs will be set at thosespecific column positions.Each tab-stop position<i>N</i>must be an integer value greater than zero,and the list must be in strictly ascending order.This is taken to mean that, from the start of a line ofoutput, tabbing to position<i>N</i>will cause the next character output tobe in the(<i>N</i>+1)thcolumn position on that line.When the<b>-t</b>option is not specified,the default is the equivalent of specifying<b>-t 8</b>(except for the interaction with<b>-a</b>,described below).Nospace-to-tab characterconversions occur for characters at positionsbeyond the last of those specified in a multiple tab-stop list.When<b>-t</b>is specified, the presence or absence of the<b>-a</b>option is ignored;conversion will not be limited to the processing of leadingblank characters.</dl></blockquote><h4><a name = "tag_001_014_2528">&nbsp;</a>OPERANDS</h4><blockquote>The following operand is supported:<dl compact><dt><i>file</i><dd>A pathname of a text file to be used as input.</dl></blockquote><h4><a name = "tag_001_014_2529">&nbsp;</a>STDIN</h4><blockquote>See the INPUT FILES section.</blockquote><h4><a name = "tag_001_014_2530">&nbsp;</a>INPUT FILES</h4><blockquote>The input files must be text files.<br></blockquote><h4><a name = "tag_001_014_2531">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>unexpand</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),the processing oftabandspace charactersand for the determination of the width in column positionseach character would occupy on a constant-width-font output device.<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<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_2532">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2533">&nbsp;</a>STDOUT</h4><blockquote>The standard output is equivalent to the input files withthe specifiedspacetotab characterconversions.</blockquote><h4><a name = "tag_001_014_2534">&nbsp;</a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_2535">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2536">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2537">&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_001_014_2538">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2539">&nbsp;</a>APPLICATION USAGE</h4><blockquote>One non-intuitive aspect of<i>unexpand</i>is its restriction to leading spaceswhen neither<b>-a</b>nor<b>-t</b>is specified.Users who desire to always convert all spaces in a filecan easily alias<i>unexpand</i>to use the<b>-a</b>or<b>-t 8</b>option.</blockquote><h4><a name = "tag_001_014_2540">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2541">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2542">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="expand.html">expand</a></i>,<i><a href="tabs.html">tabs</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 + -