<?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: 12 Practical Examples of Linux Xargs Command for Beginners	</title>
	<atom:link href="https://www.tecmint.com/xargs-command-examples/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/xargs-command-examples/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Thu, 13 Jul 2023 11:34:48 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Malcom		</title>
		<link>https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1936905</link>

		<dc:creator><![CDATA[Malcom]]></dc:creator>
		<pubDate>Tue, 27 Dec 2022 00:30:52 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=30254#comment-1936905</guid>

					<description><![CDATA[How to make &lt;strong&gt;wc&lt;/strong&gt; work with &lt;strong&gt;xargs&lt;/strong&gt;, I know &lt;strong&gt;wc&lt;/strong&gt;. 

Just &lt;strong&gt;wc&lt;/strong&gt; works fine, note file 3 had space in it &#039;&lt;strong&gt;file 3&lt;/strong&gt;&#039;.
&lt;pre&gt;
$  wc file*
   9   84  552 file1
   9   82  512 file2
   9   67  508 file 3
  27  233 1572 total
&lt;/pre&gt;
&lt;strong&gt;wc&lt;/strong&gt; command with &lt;strong&gt;xargs&lt;/strong&gt;
&lt;pre&gt;
$ echo file? &#039;file 3&#039; &#124; xargs   wc -l 
   9 file1
   9 file2
wc: file: No such file or directory
wc: 3: No such file or directory
&lt;/pre&gt;
&lt;pre&gt;
$  ls -l file*
-rw-rw-r-- 1  552 Dec 25 08:05  file1
-rw-rw-r-- 1  512 Dec 25 08:06  file2
-rw-rw-r-- 1  508 Dec 25 08:08 &#039;file 3&#039;

$ echo file? &#039;file 3&#039; &#124; xargs   -I &#039;{}&#039;  wc -l &#039;{}&#039;
wc: &#039;file1 file2 file 3&#039;: No such file or directory

$ echo file? &#039;file 3&#039; &#124; xargs   -I %  wc -l %
wc: &#039;file1 file2 file 3&#039;: No such file or directory
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>How to make <strong>wc</strong> work with <strong>xargs</strong>, I know <strong>wc</strong>. </p>
<p>Just <strong>wc</strong> works fine, note file 3 had space in it &#8216;<strong>file 3</strong>&#8216;.</p>
<pre>
$  wc file*
   9   84  552 file1
   9   82  512 file2
   9   67  508 file 3
  27  233 1572 total
</pre>
<p><strong>wc</strong> command with <strong>xargs</strong></p>
<pre>
$ echo file? 'file 3' | xargs   wc -l 
   9 file1
   9 file2
wc: file: No such file or directory
wc: 3: No such file or directory
</pre>
<pre>
$  ls -l file*
-rw-rw-r-- 1  552 Dec 25 08:05  file1
-rw-rw-r-- 1  512 Dec 25 08:06  file2
-rw-rw-r-- 1  508 Dec 25 08:08 'file 3'

$ echo file? 'file 3' | xargs   -I '{}'  wc -l '{}'
wc: 'file1 file2 file 3': No such file or directory

$ echo file? 'file 3' | xargs   -I %  wc -l %
wc: 'file1 file2 file 3': No such file or directory
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: logan		</title>
		<link>https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1850917</link>

		<dc:creator><![CDATA[logan]]></dc:creator>
		<pubDate>Tue, 26 Jul 2022 01:59:31 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=30254#comment-1850917</guid>

					<description><![CDATA[Hi Guys,

Just note that with the &lt;code&gt;-I&lt;/code&gt; argument option, the &lt;strong&gt;xargs&lt;/strong&gt; command acts like &lt;code&gt;-n1&lt;/code&gt;. 

Cheers! ;)]]></description>
			<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>Just note that with the <code>-I</code> argument option, the <strong>xargs</strong> command acts like <code>-n1</code>. </p>
<p>Cheers! ;)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Robin A. Meade		</title>
		<link>https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1352041</link>

		<dc:creator><![CDATA[Robin A. Meade]]></dc:creator>
		<pubDate>Tue, 11 Aug 2020 00:09:35 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=30254#comment-1352041</guid>

					<description><![CDATA[Examples 5, 6, 8, and 11 don&#039;t define the replace-str. They need &lt;code&gt;`-I {}`&lt;/code&gt; added.

Examples 5, 6, 11 enclose {} within double quotation marks. The quoting of &lt;code&gt;{}&lt;/code&gt; is unnecessary in all mainstream shells, as discussed here https://unix.stackexchange.com/questions/8647 (That discussion is in the context of GNU find, but is equally applicable to &lt;strong&gt;xargs&lt;/strong&gt;.)]]></description>
			<content:encoded><![CDATA[<p>Examples 5, 6, 8, and 11 don&#8217;t define the replace-str. They need <code>`-I {}`</code> added.</p>
<p>Examples 5, 6, 11 enclose {} within double quotation marks. The quoting of <code>{}</code> is unnecessary in all mainstream shells, as discussed here <a target="_blank" href="https://unix.stackexchange.com/questions/8647" rel="nofollow ugc">https://unix.stackexchange.com/questions/8647</a> (That discussion is in the context of GNU find, but is equally applicable to <strong>xargs</strong>.)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aaron Kili		</title>
		<link>https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1334518</link>

		<dc:creator><![CDATA[Aaron Kili]]></dc:creator>
		<pubDate>Wed, 20 May 2020 07:21:31 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=30254#comment-1334518</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1334419&quot;&gt;Gunnar&lt;/a&gt;.

@Gunnar 

Thanks for your useful feedback. Concerning this: &quot;Also, the output of a command is referred to as stdout NOT stdin, stdin would be the keyboard.&quot; I think it is clearly explained in the article in terms of how xargs works. It reads data from standard input, then generates and executes command lines.

True the output of a command is sent to stdout but when piped to xargs, it considered as std in(please read the xargs man page for more information).  In the above examples, we have used the pipe character to enable it to read from standard input, which in this case is the output of another command.  We will work on the spell checking and general grammar checking. Thanks once again.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1334419">Gunnar</a>.</p>
<p>@Gunnar </p>
<p>Thanks for your useful feedback. Concerning this: &#8220;Also, the output of a command is referred to as stdout NOT stdin, stdin would be the keyboard.&#8221; I think it is clearly explained in the article in terms of how xargs works. It reads data from standard input, then generates and executes command lines.</p>
<p>True the output of a command is sent to stdout but when piped to xargs, it considered as std in(please read the xargs man page for more information).  In the above examples, we have used the pipe character to enable it to read from standard input, which in this case is the output of another command.  We will work on the spell checking and general grammar checking. Thanks once again.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gunnar		</title>
		<link>https://www.tecmint.com/xargs-command-examples/comment-page-1/#comment-1334419</link>

		<dc:creator><![CDATA[Gunnar]]></dc:creator>
		<pubDate>Tue, 19 May 2020 15:37:09 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=30254#comment-1334419</guid>

					<description><![CDATA[Hi guys!

I really like this article, I just really felt the need to point out, this article could use some spell checking and general grammar checking.  Also, the output of a command is referred to as stdout NOT stdin, stdin would be the keyboard.  So you may want to correct that.  So you are instructing xargs to act on the output a command that is stdout i.e. the display.

All the best and keep up the good work amigos!]]></description>
			<content:encoded><![CDATA[<p>Hi guys!</p>
<p>I really like this article, I just really felt the need to point out, this article could use some spell checking and general grammar checking.  Also, the output of a command is referred to as stdout NOT stdin, stdin would be the keyboard.  So you may want to correct that.  So you are instructing xargs to act on the output a command that is stdout i.e. the display.</p>
<p>All the best and keep up the good work amigos!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
