I wrote an bash enumerator because I was sick of xargs
1–10 of 202 posts
Re: I wrote an bash enumerator because I was sick of xargs
#2Re: I wrote an bash enumerator because I was sick of xargs
#3bashumerate — iterate over files, lines, ranges, or lists with a consistent {} syntax. No for loops, no find -exec, no xargs flags to remember. enumerate -f '*.sh' -- wc -l {} enumerate -L a b c -- 'echo {}' Under 150 lines of bash, pluable sources, NUL-safe. https://github.com/wallach-game/bashumerate
Re: I wrote an bash enumerator because I was sick of xargs
#4 find -print0 | xargs -0 -I {} "the {} iterated command"Re: I wrote an bash enumerator because I was sick of xargs
#5find -print0 | xargs -0 -I {} "the {} iterated command"
Re: I wrote an bash enumerator because I was sick of xargs
#6Re: I wrote an bash enumerator because I was sick of xargs
#7Just go with
foo | while read X; do bar "$X"; doneRe: I wrote an bash enumerator because I was sick of xargs
#8Re: I wrote an bash enumerator because I was sick of xargs
#9The --dry-run flag of parallel made me confident to do more batch processing than I ever did with xargs.
Parallel has an option for almost everything, it's almost too much.
But I have shopped around for alternatives. The creator Ole Tange maintains a painstakingly long article of the alternatives and their differences. [0]
The gnu parallel book and reading materials [1] are excellent too.
[0] https://www.gnu.org/software/parallel/parallel_alternatives....
Re: I wrote an bash enumerator because I was sick of xargs
#10find -print0 | xargs -0 -I {} "the {} iterated command"
Other brain glazing obsd wierdness is it's two argument cd command, a cryptid I am unable to wrap my head around.