Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




Which repl do you use to replace xargs?


Conceptually, 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.


Not GP, but I use perl, which I suppose isn't much better from the perspective of something that's easy to learn :/


You don't need xargs when you're using a programming language.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: