4 ms·
Generally if you're trying to do something that feels like a "program" in shell script, rather than loosely gluing existing tools together, the threshold for mo
by pjc50 7y ago
Generally if you're trying to do something that feels like a "program" in shell script, rather than loosely gluing existing tools together, the threshold for moving it into Perl or Python should be low. Even things like trying to get the quoting right for lists of files some of which may have spaces in their names is fiddly enough to drive people to writing a "proper" program.
(or was this comment intended for https://news.ycombinator.com/item?id=21013150 https://news.ycombinator.com/item?id=21013150 )
- robohoe 7y agoThe moment I have to use arrays in bash, I open up a python interpreter. Syntax makes far more sense than in bash.
- kjeetgill 7y agoI used to drop into python for ad-hoc work as soon as I needed even for/if or any arithmetic. Now that I actually manage to remember how to use for-loops when I need them and I picked up awk,I haven't needed to since. For a maintainable script pythons great of course.