3 ms·
> but struggle with some of the more powerful building blocks that can make someone a real shell power user (`xargs`, nontrivial uses of `find`, here-strings, s
by brabel 4y ago
> but struggle with some of the more powerful building blocks that can make someone a real shell power user (`xargs`, nontrivial uses of `find`, here-strings, subshells and blocks, process substitution, etc.).
I am one of those... as soon as I don't know how to do something in the shell, though, I just fire up a REPL or a "scratch" in the IDE and write what I want in a "proper" language. Sorry, but shel scripting is not always the best way to go. I eventually did learn me some AWK and that was useful, but most of the time I don't use even that, it's just so much easier for a programmer to use a programming language to do stuff.
- wodenokoto 4y agoWhich repl do you use to replace xargs?
- e63f67dd-065b 4y agoNot GP, but I use perl, which I suppose isn't much better from the perspective of something that's easy to learn :/
- brabel 4y agoYou don't need xargs when you're using a programming language.
- hibbelig 4y agoConceptually, xargs applies some logic to each item in a list. Many programming language support this, e.g. Python: for item in some_list: foo(item) Of course, the above is a replacement for "xargs -n 1" only; but I argue that the batching functionality of xargs isn't really needed in programming languages.