3 ms·
As a youngling I have to say, I always liked the idea of the shell as something where you can pipe stuff inbetween programs. It is a genius concept. The problem
by atoav 2y ago
As a youngling I have to say, I always liked the idea of the shell as something where you can pipe stuff inbetween programs. It is a genius concept. The problem is that in the real world implementation of the idea you have something like bash, that sucks for text processing with all its footguns of unescaped strings, spaces, wildcard operators and such.
Maybe it has to do with strings not really having been a first class citizen in C? Processing strings in C is a (dangerous) pain even in the year 2024.
I often find myself just writing python scripts calling subprocesses (if needed, so much is already included), ideally with a --json option so I get proper machine-readable output. This has shown to be far more stable and reliable than bash.
- larodi 2y agoAnd eventually you come to conclusion that you need powershell like pipes of objects. Btw someone tried to implement a shell in Python which feeds structures, not sure the name though… was in HN front a while ago