13 ms·
If I wasn’t on mobile I would dig up some excellent articles on the topic, so please excuse the too brief summary: The core concept of the UNIX philosophy is t
by jiggawatts 5y ago
If I wasn’t on mobile I would dig up some excellent articles on the topic, so please excuse the too brief summary:
The core concept of the UNIX philosophy is that each tool should do one thing, and then you can compose them.
In practice this doesn’t work because of the physical constraints of the small machines used back in the day when UNIX was developed.
The original shell concept used plain byte or char streams, which are too primitive.
The end result is that every tool has to do parsing and serialisation. Worse, they pretty print by default, losing the structure and making subsequent steps fragile.
So for example, Visual Studio crashes if your Git version is “wrong” because it’s trying and failing to parse the output text.
Similarly if you ask UNIX people to solve simple problems like “stop all processes run by ‘Ash’”, they’ll reach for grep and accidentally stop every bash process also.
In PowerShell the commands don’t parse. They don’t serialise. They don’t pretty print. They don’t sort, filter, group, export, or import.
Instead there are dedicated, single-purpose commands for those functions that compose elegantly.
This is the UNIX philosophy, and PowerShell does it more than bash.
- majkinetor 5y agoAmen to that!