Skip to content

Commit d57e800

Browse files
committed
🤖 Auto-update eBook files and GitHub Pages [skip ci]
1 parent 90958f9 commit d57e800

File tree

7 files changed

+132
-0
lines changed

7 files changed

+132
-0
lines changed
9.67 KB
Binary file not shown.
9.58 KB
Binary file not shown.
1.91 KB
Binary file not shown.

ebook/en/export/101-linux-commands.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21058,6 +21058,72 @@ <h2>Manual Reference</h2>
2105821058
<p>For additional information and advanced usage:</p>
2105921059
<pre><code class="language-bash hljs bash" data-lang="bash">man ifplugstatus
2106021060
</code></pre>
21061+
<div style="page-break-after: always;"></div><h1>The <code>column</code> Command</h1>
21062+
<p>The <code>column</code> command is used to format its input into multiple columns. It's particularly useful for making text-based tables and improving the readability of command output.</p>
21063+
<h2>Command Syntax</h2>
21064+
<pre><code class="language-bash hljs bash" data-lang="bash">column [options] [file]...
21065+
</code></pre>
21066+
<h2>Command Options</h2>
21067+
<ul>
21068+
<li><code>-t</code>: Determine the number of columns automatically and create a table</li>
21069+
<li><code>-s</code>: Specify the column delimiter (default is whitespace)</li>
21070+
<li><code>-n</code>: Don't merge multiple adjacent delimiters</li>
21071+
<li><code>-c</code>: Output in column format with specified width</li>
21072+
<li><code>-x</code>: Fill columns before rows</li>
21073+
<li><code>-L</code>: Align all entries to the left</li>
21074+
<li><code>-R</code>: Align all entries to the right</li>
21075+
<li><code>-o</code>: Specify column separator for table output</li>
21076+
</ul>
21077+
<h2>Examples</h2>
21078+
<ol>
21079+
<li>Basic Column Formatting</li>
21080+
</ol>
21081+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Create a simple list and format it into columns</span>
21082+
ls | column
21083+
</code></pre>
21084+
<ol start="2">
21085+
<li>Creating a Table from Delimited Data</li>
21086+
</ol>
21087+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Format /etc/passwd entries into a neat table</span>
21088+
cut -d: -f1,6,7 /etc/passwd | column -t -s:
21089+
</code></pre>
21090+
<ol start="3">
21091+
<li>Formatting Command Output</li>
21092+
</ol>
21093+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Display mount information in a clean tabular format</span>
21094+
mount | column -t
21095+
</code></pre>
21096+
<ol start="4">
21097+
<li>Custom Column Separator</li>
21098+
</ol>
21099+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Format CSV data with custom separator</span>
21100+
<span class="hljs-built_in">echo</span> <span class="hljs-string">"Name,Age,City\nJohn,25,NYC\nJane,30,LA"</span> | column -t -s,
21101+
</code></pre>
21102+
<ol start="5">
21103+
<li>Left-aligned Table</li>
21104+
</ol>
21105+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Create a left-aligned table from space-separated data</span>
21106+
ps aux | head -n 5 | column -t -L
21107+
</code></pre>
21108+
<h2>Additional Information</h2>
21109+
<ul>
21110+
<li>The <code>column</code> command is part of the <code>util-linux</code> package</li>
21111+
<li>It's particularly useful in shell scripts for formatting output</li>
21112+
<li>Can handle both file input and standard input (stdin)</li>
21113+
<li>Works well with other text processing commands like <code>cut</code>, <code>sort</code>, and <code>grep</code></li>
21114+
</ul>
21115+
<h2>See Also</h2>
21116+
<ul>
21117+
<li><a href="098-the-cut-command.md"><code>cut</code></a> - remove sections from files</li>
21118+
<li><a href="059-the-sort-command.md"><code>sort</code></a> - sort lines of text files</li>
21119+
<li><a href="060-the-paste-command.md"><code>paste</code></a> - merge lines of files</li>
21120+
<li><a href="119-the-tr-command.md"><code>tr</code></a> - translate or delete characters</li>
21121+
</ul>
21122+
<h2>Further Reading</h2>
21123+
<ul>
21124+
<li><code>man column</code> - manual page for the column command</li>
21125+
<li><a href="https://www.gnu.org/software/coreutils/">GNU Coreutils</a></li>
21126+
</ul>
2106121127
<div style="page-break-after: always;"></div><h1>Conclusion</h1>
2106221128
<p>Congratulations! You've reached the end of the <strong>101 Linux Commands eBook</strong>. Throughout this journey, you've explored over 135 essential Linux commands that form the foundation of system administration, development, and everyday Linux usage.</p>
2106321129
<h2>What You've Learned</h2>
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

index.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21058,6 +21058,72 @@ <h2>Manual Reference</h2>
2105821058
<p>For additional information and advanced usage:</p>
2105921059
<pre><code class="language-bash hljs bash" data-lang="bash">man ifplugstatus
2106021060
</code></pre>
21061+
<div style="page-break-after: always;"></div><h1>The <code>column</code> Command</h1>
21062+
<p>The <code>column</code> command is used to format its input into multiple columns. It's particularly useful for making text-based tables and improving the readability of command output.</p>
21063+
<h2>Command Syntax</h2>
21064+
<pre><code class="language-bash hljs bash" data-lang="bash">column [options] [file]...
21065+
</code></pre>
21066+
<h2>Command Options</h2>
21067+
<ul>
21068+
<li><code>-t</code>: Determine the number of columns automatically and create a table</li>
21069+
<li><code>-s</code>: Specify the column delimiter (default is whitespace)</li>
21070+
<li><code>-n</code>: Don't merge multiple adjacent delimiters</li>
21071+
<li><code>-c</code>: Output in column format with specified width</li>
21072+
<li><code>-x</code>: Fill columns before rows</li>
21073+
<li><code>-L</code>: Align all entries to the left</li>
21074+
<li><code>-R</code>: Align all entries to the right</li>
21075+
<li><code>-o</code>: Specify column separator for table output</li>
21076+
</ul>
21077+
<h2>Examples</h2>
21078+
<ol>
21079+
<li>Basic Column Formatting</li>
21080+
</ol>
21081+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Create a simple list and format it into columns</span>
21082+
ls | column
21083+
</code></pre>
21084+
<ol start="2">
21085+
<li>Creating a Table from Delimited Data</li>
21086+
</ol>
21087+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Format /etc/passwd entries into a neat table</span>
21088+
cut -d: -f1,6,7 /etc/passwd | column -t -s:
21089+
</code></pre>
21090+
<ol start="3">
21091+
<li>Formatting Command Output</li>
21092+
</ol>
21093+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Display mount information in a clean tabular format</span>
21094+
mount | column -t
21095+
</code></pre>
21096+
<ol start="4">
21097+
<li>Custom Column Separator</li>
21098+
</ol>
21099+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Format CSV data with custom separator</span>
21100+
<span class="hljs-built_in">echo</span> <span class="hljs-string">"Name,Age,City\nJohn,25,NYC\nJane,30,LA"</span> | column -t -s,
21101+
</code></pre>
21102+
<ol start="5">
21103+
<li>Left-aligned Table</li>
21104+
</ol>
21105+
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Create a left-aligned table from space-separated data</span>
21106+
ps aux | head -n 5 | column -t -L
21107+
</code></pre>
21108+
<h2>Additional Information</h2>
21109+
<ul>
21110+
<li>The <code>column</code> command is part of the <code>util-linux</code> package</li>
21111+
<li>It's particularly useful in shell scripts for formatting output</li>
21112+
<li>Can handle both file input and standard input (stdin)</li>
21113+
<li>Works well with other text processing commands like <code>cut</code>, <code>sort</code>, and <code>grep</code></li>
21114+
</ul>
21115+
<h2>See Also</h2>
21116+
<ul>
21117+
<li><a href="098-the-cut-command.md"><code>cut</code></a> - remove sections from files</li>
21118+
<li><a href="059-the-sort-command.md"><code>sort</code></a> - sort lines of text files</li>
21119+
<li><a href="060-the-paste-command.md"><code>paste</code></a> - merge lines of files</li>
21120+
<li><a href="119-the-tr-command.md"><code>tr</code></a> - translate or delete characters</li>
21121+
</ul>
21122+
<h2>Further Reading</h2>
21123+
<ul>
21124+
<li><code>man column</code> - manual page for the column command</li>
21125+
<li><a href="https://www.gnu.org/software/coreutils/">GNU Coreutils</a></li>
21126+
</ul>
2106121127
<div style="page-break-after: always;"></div><h1>Conclusion</h1>
2106221128
<p>Congratulations! You've reached the end of the <strong>101 Linux Commands eBook</strong>. Throughout this journey, you've explored over 135 essential Linux commands that form the foundation of system administration, development, and everyday Linux usage.</p>
2106321129
<h2>What You've Learned</h2>

0 commit comments

Comments
 (0)