[ale] xargs guide

Jim Kinney jim.kinney at gmail.com
Thu Jul 30 23:05:18 EDT 2015


Yay! Nice work. Xargs is a very useful tool and you've hit some really
salient points of usage.

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't hit OK. That allows me to see what else will be removed with
offendingpackage. Once I'm ok with the remivak, I run it again and make it
yum -y remove.

Xargs and find are a better match than exec {}.
On Jul 30, 2015 10:40 PM, "Steve Litt" <slitt at troubleshooters.com> wrote:

> Hi all,
>
> xargs is a gender-changer type program that adapts one program's stdout
> to the next program's command line arguments. It's extremely handy for
> shell scripting, but it can be tricky. I've written a short guide for
> xargs that shows how to get around the usual xargs landmines:
>
> http://www.troubleshooters.com/linux/xargs.htm
>
> Hope you like it.
>
> SteveT
>
> Steve Litt
> July 2015 featured book: Rapid Learning for the 21st Century
> http://www.troubleshooters.com/rl21
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150730/789da5d0/attachment.html>


More information about the Ale mailing list