logoalt Hacker News

PunchyHamsteryesterday at 11:42 PM3 repliesview on HN

missed the point. reason to use xargs or parallel are generally two: list of arguments is too long, or list of arguments that is kept in memory would take too much

for example

    for a in `find / ` ; do echo $a ; done
will take A LOT of memory, while using find's -exec, xargs, or parallel will not

Replies

unsnap_bicepsyesterday at 11:54 PM

I looked into the source and the underlaying source uses a glob and suffers from the issue you brought up.

https://github.com/wallach-game/bashumerate/blob/master/lib/...

raggitoday at 6:02 AM

In my experience once you get to the point where you run out of space in the glob you’re often suffering with poor performance from spawning children as well and it’s time to move to a more formal program even if it’s a script, writing out work plans and completions to list files to avoid wasted time. It’s often a great guardrail to remind you to do this

foobarquxyesterday at 11:53 PM

But bashenumerate doesn't do that? The parent is saying you should zsh shortloops instead of bashenumerate not zsh shortloops instead of xargs.