News for hackers. Stuff that matters.
Re:A small primer on xargs by babarock on Monday May 14, 2012 @04:41AM (#3970057)
Furthermore, parsing the output of `ls` is a terrible practice[1] that makes for an even poorer sample.

A little further in the article, the author even suggests running

    `ls | grep junk`
(instead of the much simpler `ls junk*`. Do I need to point that out?).

I also know some people are going to retort that wasting a process or a pipe is not that bad. This discussion has been had over and over again, probably ever since Unix was invented.

In any case, the poor example chosen, as well as the flaky commands used, seriously hinder the credibility of the article.

[1]: http://mywiki.wooledge.org/ParsingLs

Re:A small primer on xargs by emmelaich on Monday May 14, 2012 @07:06AM (#3970434)
They don't do the quite the same thing.

   ls | grep junk
is more similar to

   ls -d *junk*
You can argue the first is simpler. You can also argue more successfully that it is more general.

edit: I acknowledge the points in your link. Advocates for the unix "bunch of small tools" philosophy tend to overlook its weak spots.