<p dir="ltr">Yay! Nice work. Xargs is a very useful tool and you&#39;ve hit some really salient points of usage.</p>
<p dir="ltr">I use xargs almost daily for removing unneeded packages using yum. Rpm -qa |grep offendingpackage | xargs yum remove. That runs once and fails as I didn&#39;t hit OK. That allows me to see what else will be removed with offendingpackage. Once I&#39;m ok with the remivak, I run it again and make it yum -y remove.</p>
<p dir="ltr">Xargs and find are a better match than exec {}.</p>
<div class="gmail_quote">On Jul 30, 2015 10:40 PM, &quot;Steve Litt&quot; &lt;<a href="mailto:slitt@troubleshooters.com">slitt@troubleshooters.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
xargs is a gender-changer type program that adapts one program&#39;s stdout<br>
to the next program&#39;s command line arguments. It&#39;s extremely handy for<br>
shell scripting, but it can be tricky. I&#39;ve written a short guide for<br>
xargs that shows how to get around the usual xargs landmines:<br>
<br>
<a href="http://www.troubleshooters.com/linux/xargs.htm" rel="noreferrer" target="_blank">http://www.troubleshooters.com/linux/xargs.htm</a><br>
<br>
Hope you like it.<br>
<br>
SteveT<br>
<br>
Steve Litt<br>
July 2015 featured book: Rapid Learning for the 21st Century<br>
<a href="http://www.troubleshooters.com/rl21" rel="noreferrer" target="_blank">http://www.troubleshooters.com/rl21</a><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>