This commit is contained in:
sylvestre
2023-08-10 02:42:10 +00:00
parent 9839da361c
commit e6c78b90bc
9 changed files with 24 additions and 24 deletions
+11 -11
View File
@@ -1374,7 +1374,7 @@ With no FILE, or when FILE is -, read standard input.</p>
</dd>
</dl>
<h2 id="examples-7"><a class="header" href="#examples-7">Examples</a></h2>
<p>Print the contents of a file to the standard output:</p>
<p>Print the contents of a file to <code>stdout</code>:</p>
<pre><code class="language-shell">cat {{path/to/file}}
</code></pre>
<p>Concatenate several files into an output file:</p>
@@ -3393,10 +3393,10 @@ With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read sta
</dd>
</dl>
<h2 id="examples-27"><a class="header" href="#examples-27">Examples</a></h2>
<p>Convert tabs in each file to spaces, writing to standard output:</p>
<p>Convert tabs in each file to spaces, writing to <code>stdout</code>:</p>
<pre><code class="language-shell">expand {{path/to/file}}
</code></pre>
<p>Convert tabs to spaces, reading from standard input:</p>
<p>Convert tabs to spaces, reading from <code>stdin</code>:</p>
<pre><code class="language-shell">expand
</code></pre>
<p>Do not convert tabs after non blanks:</p>
@@ -5336,7 +5336,7 @@ expression, <code>BRE</code></li>
<p>Number non-blank lines in a file:</p>
<pre><code class="language-shell">nl {{path/to/file}}
</code></pre>
<p>Read from standard output:</p>
<p>Read from <code>stdout</code>:</p>
<pre><code class="language-shell">cat {{path/to/file}} | nl {{options}} -
</code></pre>
<p>Number only the lines with printable text:</p>
@@ -8224,13 +8224,13 @@ In this case the corresponding stream will be fully buffered with the buffer siz
<p>NOTE: If <code>COMMAND</code> adjusts the buffering of its standard streams (<code>tee</code> does for e.g.) then that will override corresponding settings changed by <code>stdbuf</code>.
Also some filters (like <code>dd</code> and <code>cat</code> etc.) don't use streams for I/O, and are thus unaffected by <code>stdbuf</code> settings.</p>
<h2 id="examples-83"><a class="header" href="#examples-83">Examples</a></h2>
<p>Change the standard input buffer size to 512 KiB:</p>
<p>Change <code>stdin</code> buffer size to 512 KiB:</p>
<pre><code class="language-shell">stdbuf --input={{512K}} {{command}}
</code></pre>
<p>Change the standard output buffer to line-buffered:</p>
<p>Change <code>stdout</code> buffer to line-buffered:</p>
<pre><code class="language-shell">stdbuf --output={{L}} {{command}}
</code></pre>
<p>Change the standard error buffer to unbuffered:</p>
<p>Change <code>stderr</code> buffer to unbuffered:</p>
<pre><code class="language-shell">stdbuf --error={{0}} {{command}}
</code></pre>
<blockquote>
@@ -8542,13 +8542,13 @@ With no FILE, or when FILE is -, read standard input.</p>
</dl>
<p>If a FILE is -, it refers to a file named - .</p>
<h2 id="examples-89"><a class="header" href="#examples-89">Examples</a></h2>
<p>Copy standard input to each file, and also to standard output:</p>
<p>Copy <code>stdin</code> to each file, and also to <code>stdout</code>:</p>
<pre><code class="language-shell">echo &quot;example&quot; | tee {{path/to/file}}
</code></pre>
<p>Append to the given files, do not overwrite:</p>
<pre><code class="language-shell">echo &quot;example&quot; | tee -a {{path/to/file}}
</code></pre>
<p>Print standard input to the terminal, and also pipe it into another program for further processing:</p>
<p>Print <code>stdin</code> to the terminal, and also pipe it into another program for further processing:</p>
<pre><code class="language-shell">echo &quot;example&quot; | tee {{/dev/tty}} | {{xargs printf &quot;[%s]&quot;}}
</code></pre>
<p>Create a directory called &quot;example&quot;, count the number of characters in &quot;example&quot; and write &quot;example&quot; to the terminal:</p>
@@ -9158,10 +9158,10 @@ With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read sta
</dd>
</dl>
<h2 id="examples-99"><a class="header" href="#examples-99">Examples</a></h2>
<p>Convert blanks in each file to tabs, writing to standard output:</p>
<p>Convert blanks in each file to tabs, writing to <code>stdout</code>:</p>
<pre><code class="language-shell">unexpand {{path/to/file}}
</code></pre>
<p>Convert blanks to tabs, reading from standard output:</p>
<p>Convert blanks to tabs, reading from <code>stdout</code>:</p>
<pre><code class="language-shell">unexpand
</code></pre>
<p>Convert all blanks, instead of just initial blanks:</p>
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -247,7 +247,7 @@ With no FILE, or when FILE is -, read standard input.</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Print the contents of a file to the standard output:</p>
<p>Print the contents of a file to <code>stdout</code>:</p>
<pre><code class="language-shell">cat {{path/to/file}}
</code></pre>
<p>Concatenate several files into an output file:</p>
+2 -2
View File
@@ -223,10 +223,10 @@ With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read sta
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Convert tabs in each file to spaces, writing to standard output:</p>
<p>Convert tabs in each file to spaces, writing to <code>stdout</code>:</p>
<pre><code class="language-shell">expand {{path/to/file}}
</code></pre>
<p>Convert tabs to spaces, reading from standard input:</p>
<p>Convert tabs to spaces, reading from <code>stdin</code>:</p>
<pre><code class="language-shell">expand
</code></pre>
<p>Do not convert tabs after non blanks:</p>
+1 -1
View File
@@ -275,7 +275,7 @@ expression, <code>BRE</code></li>
<p>Number non-blank lines in a file:</p>
<pre><code class="language-shell">nl {{path/to/file}}
</code></pre>
<p>Read from standard output:</p>
<p>Read from <code>stdout</code>:</p>
<pre><code class="language-shell">cat {{path/to/file}} | nl {{options}} -
</code></pre>
<p>Number only the lines with printable text:</p>
+3 -3
View File
@@ -230,13 +230,13 @@ In this case the corresponding stream will be fully buffered with the buffer siz
<p>NOTE: If <code>COMMAND</code> adjusts the buffering of its standard streams (<code>tee</code> does for e.g.) then that will override corresponding settings changed by <code>stdbuf</code>.
Also some filters (like <code>dd</code> and <code>cat</code> etc.) don't use streams for I/O, and are thus unaffected by <code>stdbuf</code> settings.</p>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Change the standard input buffer size to 512 KiB:</p>
<p>Change <code>stdin</code> buffer size to 512 KiB:</p>
<pre><code class="language-shell">stdbuf --input={{512K}} {{command}}
</code></pre>
<p>Change the standard output buffer to line-buffered:</p>
<p>Change <code>stdout</code> buffer to line-buffered:</p>
<pre><code class="language-shell">stdbuf --output={{L}} {{command}}
</code></pre>
<p>Change the standard error buffer to unbuffered:</p>
<p>Change <code>stderr</code> buffer to unbuffered:</p>
<pre><code class="language-shell">stdbuf --error={{0}} {{command}}
</code></pre>
<blockquote>
+2 -2
View File
@@ -227,13 +227,13 @@
</dl>
<p>If a FILE is -, it refers to a file named - .</p>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Copy standard input to each file, and also to standard output:</p>
<p>Copy <code>stdin</code> to each file, and also to <code>stdout</code>:</p>
<pre><code class="language-shell">echo &quot;example&quot; | tee {{path/to/file}}
</code></pre>
<p>Append to the given files, do not overwrite:</p>
<pre><code class="language-shell">echo &quot;example&quot; | tee -a {{path/to/file}}
</code></pre>
<p>Print standard input to the terminal, and also pipe it into another program for further processing:</p>
<p>Print <code>stdin</code> to the terminal, and also pipe it into another program for further processing:</p>
<pre><code class="language-shell">echo &quot;example&quot; | tee {{/dev/tty}} | {{xargs printf &quot;[%s]&quot;}}
</code></pre>
<p>Create a directory called &quot;example&quot;, count the number of characters in &quot;example&quot; and write &quot;example&quot; to the terminal:</p>
+2 -2
View File
@@ -227,10 +227,10 @@ With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read sta
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Convert blanks in each file to tabs, writing to standard output:</p>
<p>Convert blanks in each file to tabs, writing to <code>stdout</code>:</p>
<pre><code class="language-shell">unexpand {{path/to/file}}
</code></pre>
<p>Convert blanks to tabs, reading from standard output:</p>
<p>Convert blanks to tabs, reading from <code>stdout</code>:</p>
<pre><code class="language-shell">unexpand
</code></pre>
<p>Convert all blanks, instead of just initial blanks:</p>