<?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 Use &#8216;tee&#8217; Command in Linux [8 Useful Examples]	</title>
	<atom:link href="https://www.tecmint.com/tee-command-examples/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/tee-command-examples/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Fri, 14 Jul 2023 04:30:38 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: dragonmouth		</title>
		<link>https://www.tecmint.com/tee-command-examples/comment-page-1/#comment-1972028</link>

		<dc:creator><![CDATA[dragonmouth]]></dc:creator>
		<pubDate>Fri, 24 Feb 2023 16:34:54 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=49570#comment-1972028</guid>

					<description><![CDATA[What is a practical application for #8 other than to demonstrate the use of the &#039;tee&#039; command?]]></description>
			<content:encoded><![CDATA[<p>What is a practical application for #8 other than to demonstrate the use of the &#8216;tee&#8217; command?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Narendra Kangralkar		</title>
		<link>https://www.tecmint.com/tee-command-examples/comment-page-1/#comment-1970476</link>

		<dc:creator><![CDATA[Narendra Kangralkar]]></dc:creator>
		<pubDate>Wed, 22 Feb 2023 14:12:38 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=49570#comment-1970476</guid>

					<description><![CDATA[Hello @LV,

In the &lt;strong&gt;7th&lt;/strong&gt; example, we have used the combination of the &lt;strong&gt;Vim&lt;/strong&gt; and &lt;strong&gt;Shell&lt;/strong&gt; commands. 

In this example:

&lt;code&gt;:w&lt;/code&gt; is a Vim command which writes buffer contents to the file.
&lt;code&gt;!&lt;/code&gt; is also a Vim command and it&#039;s used to execute the shell command.
&lt;code&gt;%&lt;/code&gt; is a Vim register that represents the current file. In this case, it will be &lt;strong&gt;output.txt&lt;/strong&gt;.

So in a nutshell, we are using the &lt;strong&gt;tee&lt;/strong&gt; command to redirect the output of the &lt;code&gt;:w&lt;/code&gt; command to the current file i.e. &lt;strong&gt;output.txt&lt;/strong&gt;. In this case, the file is owned by the root user. Hence we have to use the combination of the &lt;strong&gt;sudo&lt;/strong&gt; and &lt;strong&gt;tee&lt;/strong&gt; commands.

For the &lt;strong&gt;8th&lt;/strong&gt; example, let&#039;s understand the command behavior without the &lt;code&gt;-i&lt;/code&gt; option. First, let&#039;s use the &lt;strong&gt;tee&lt;/strong&gt; command without any arguments:
&lt;pre&gt;
[tecmint@tecmint]$ tee
&lt;/pre&gt;
In this case, the command will read the input from the standard input and will display it on the standard output. At any time, we can use the &lt;code&gt;ctrl+C&lt;/code&gt; key combination to terminate the command execution. This happens because the default behavior of the &lt;strong&gt;SIGINT&lt;/strong&gt; signal is to terminate the process.

However, the same key combination will not work if we disable the interrupts using the &lt;code&gt;-i&lt;/code&gt; option. In that case, we have to use the &lt;code&gt;ctrl+D&lt;/code&gt; key combination to stop the command execution:
&lt;pre&gt;
[tecmint@tecmint]$ tee -i
&lt;/pre&gt;
This option plays an important role when we want to redirect the continuous stream without interruption. 

Just like other examples, we can also use the file names with this option.]]></description>
			<content:encoded><![CDATA[<p>Hello @LV,</p>
<p>In the <strong>7th</strong> example, we have used the combination of the <strong>Vim</strong> and <strong>Shell</strong> commands. </p>
<p>In this example:</p>
<p><code>:w</code> is a Vim command which writes buffer contents to the file.<br />
<code>!</code> is also a Vim command and it&#8217;s used to execute the shell command.<br />
<code>%</code> is a Vim register that represents the current file. In this case, it will be <strong>output.txt</strong>.</p>
<p>So in a nutshell, we are using the <strong>tee</strong> command to redirect the output of the <code>:w</code> command to the current file i.e. <strong>output.txt</strong>. In this case, the file is owned by the root user. Hence we have to use the combination of the <strong>sudo</strong> and <strong>tee</strong> commands.</p>
<p>For the <strong>8th</strong> example, let&#8217;s understand the command behavior without the <code>-i</code> option. First, let&#8217;s use the <strong>tee</strong> command without any arguments:</p>
<pre>
[tecmint@tecmint]$ tee
</pre>
<p>In this case, the command will read the input from the standard input and will display it on the standard output. At any time, we can use the <code>ctrl+C</code> key combination to terminate the command execution. This happens because the default behavior of the <strong>SIGINT</strong> signal is to terminate the process.</p>
<p>However, the same key combination will not work if we disable the interrupts using the <code>-i</code> option. In that case, we have to use the <code>ctrl+D</code> key combination to stop the command execution:</p>
<pre>
[tecmint@tecmint]$ tee -i
</pre>
<p>This option plays an important role when we want to redirect the continuous stream without interruption. </p>
<p>Just like other examples, we can also use the file names with this option.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LV		</title>
		<link>https://www.tecmint.com/tee-command-examples/comment-page-1/#comment-1970164</link>

		<dc:creator><![CDATA[LV]]></dc:creator>
		<pubDate>Wed, 22 Feb 2023 04:17:13 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=49570#comment-1970164</guid>

					<description><![CDATA[Thanks for this article, it is helpful. Regarding points 7 and 8 suppose you could explain the need for the action and its syntax a bit further.]]></description>
			<content:encoded><![CDATA[<p>Thanks for this article, it is helpful. Regarding points 7 and 8 suppose you could explain the need for the action and its syntax a bit further.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
