<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Pipe Command Output to Other Commands in Linux	</title>
	<atom:link href="https://www.tecmint.com/pipe-command-output-to-other-commands/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/pipe-command-output-to-other-commands/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Wed, 31 Jul 2024 04:57:45 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2196963</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Wed, 31 Jul 2024 04:57:45 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=27511#comment-2196963</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2196700&quot;&gt;David Webb&lt;/a&gt;.

@David,

You&#039;re absolutely right! 

The &lt;strong&gt;tee&lt;/strong&gt; command is particularly useful when you want to direct output to multiple files at once or also display it on the terminal while saving it to a file. 

For a simple case where you only need to save output to one file, redirection with &lt;code&gt;&#062;&lt;/code&gt; or &lt;code&gt;&#062;&#062;&lt;/code&gt; works just fine.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2196700">David Webb</a>.</p>
<p>@David,</p>
<p>You&#8217;re absolutely right! </p>
<p>The <strong>tee</strong> command is particularly useful when you want to direct output to multiple files at once or also display it on the terminal while saving it to a file. </p>
<p>For a simple case where you only need to save output to one file, redirection with <code>&gt;</code> or <code>&gt;&gt;</code> works just fine.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Webb		</title>
		<link>https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2196700</link>

		<dc:creator><![CDATA[David Webb]]></dc:creator>
		<pubDate>Tue, 30 Jul 2024 13:14:38 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=27511#comment-2196700</guid>

					<description><![CDATA[I see a lot of articles explaining the tee command the way you did, but why use tee like this?

Your code example:
&lt;pre&gt;
ps -eo cmd,pid,ppid,%mem,%cpu --sort=-%mem &#124; head &#124; tee topprocs.txt
&lt;/pre&gt;
could just as easily use redirection instead of tee:
&lt;pre&gt;
ps -eo cmd,pid,ppid,%mem,%cpu --sort=-%mem &#124; head &#062; topprocs.txt
&lt;/pre&gt;
Use &lt;code&gt;&#062;&#062;&lt;/code&gt; for appending.

In my opinion, tee is useful if you need to send the same output to multiple files simultaneously:
&lt;pre&gt;
ps -eo cmd,pid,ppid,%mem,%cpu --sort=-%mem &#124; head &#124; tee topprocs1.txt topprocs2.txt
&lt;/pre&gt;
and so on.



]]></description>
			<content:encoded><![CDATA[<p>I see a lot of articles explaining the tee command the way you did, but why use tee like this?</p>
<p>Your code example:</p>
<pre>
ps -eo cmd,pid,ppid,%mem,%cpu --sort=-%mem | head | tee topprocs.txt
</pre>
<p>could just as easily use redirection instead of tee:</p>
<pre>
ps -eo cmd,pid,ppid,%mem,%cpu --sort=-%mem | head &gt; topprocs.txt
</pre>
<p>Use <code>&gt;&gt;</code> for appending.</p>
<p>In my opinion, tee is useful if you need to send the same output to multiple files simultaneously:</p>
<pre>
ps -eo cmd,pid,ppid,%mem,%cpu --sort=-%mem | head | tee topprocs1.txt topprocs2.txt
</pre>
<p>and so on.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2025450</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Mon, 12 Jun 2023 04:21:32 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=27511#comment-2025450</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2025306&quot;&gt;Pavel Vachek&lt;/a&gt;.

@Pavel,

Thanks, corrected the command in the article...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2025306">Pavel Vachek</a>.</p>
<p>@Pavel,</p>
<p>Thanks, corrected the command in the article&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pavel Vachek		</title>
		<link>https://www.tecmint.com/pipe-command-output-to-other-commands/comment-page-1/#comment-2025306</link>

		<dc:creator><![CDATA[Pavel Vachek]]></dc:creator>
		<pubDate>Sun, 11 Jun 2023 19:17:09 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=27511#comment-2025306</guid>

					<description><![CDATA[&quot;Tree – Send Command Output to Other Command and Save to File&quot;

I think that the first word in the title should read &quot;&lt;strong&gt;Tee&lt;/strong&gt;&quot;, not &quot;&lt;strong&gt;Tree&lt;/strong&gt;&quot;.]]></description>
			<content:encoded><![CDATA[<p>&#8220;Tree – Send Command Output to Other Command and Save to File&#8221;</p>
<p>I think that the first word in the title should read &#8220;<strong>Tee</strong>&#8220;, not &#8220;<strong>Tree</strong>&#8220;.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
