News for hackers. Stuff that matters.
Re:Pure Bash Bible by masklinn on Thursday September 19, 2019 @03:54AM (#21014229)
> That's not as easy as

> cat something | grep "this" | cut -f 1 | sed -e 's/.../.../'

Literally none of this is actually useful if you're already in Python:

    (
        line.split('\t')[0].replace(…, …)
        for line in open('something')
        if 'this' in line
    )
> You end up writing too much code

I can believe that if you're calling to external processes to perform operations which are pretty much trivial in the language.

Re:Pure Bash Bible by kamaal on Thursday September 19, 2019 @11:14AM (#21016957)
Of course, if you plan to use one $language alone, you can do anything in that $language.

This question is specific to pipes.

Re:Pure Bash Bible by masklinn on Thursday September 19, 2019 @12:56PM (#21018096)
> Of course, if you plan to use one $language alone, you can do anything in that $language.

That's missing what I'm noting though, which is that you don't need pipes anywhere near a shell script if you can simply do more of your work in-language. Case in point being that the entire pipeline you cited as an issue has no reason to exist outside of a shell or shell script.

Re:Pure Bash Bible by kamaal on Friday September 20, 2019 @12:23AM (#21023315)
That's because regexes are an another pain in Python, You have to write a lot of boiler plate exception handling code. Plus the same boiler plate code for file operations.

It doesn't feel like the language was designed for these tasks.