5 ms·
Why? While it’s not as good as bash or zsh as an interactive shell, for scripting it has a saner syntax, without all the weirdness that bash has. Also powershe
by alerighi 5y ago
Why? While it’s not as good as bash or zsh as an interactive shell, for scripting it has a saner syntax, without all the weirdness that bash has. Also powershell can access basically any .net api, and thus can do things like serialise json objects built in, without learning external tools like jq.
- hnlmorg 5y ago> While it’s not as good as bash or zsh as an interactive shell That's the problem though. For me it totally sucks as an interactive shell because it's far too verbose. And if I needed to write scripts on Linux then I'm already spoilt for choice: Perl, Python, Tcl, Awk, etc are all usually pre-installed with my Linux distros. Then you can add Ruby, Go, Javascript (via Node), PHP, Rust, C++ and any .NET languages like C# into the mix too....plus many many many more. While byte streams are largely seen as a joke compared to typed pipes like in Powershell and Murex, you do have far greater compatibility with byte streams since all you're sending is bytes -- which means you can write scripts in whatever the hell you want and still use them in Bash / Zsh just fine. Then you have the 40 years of coreutils. People talk about legacy as being cruft and while there is some truth in that, there's also truth in the fact that if you need to do something in the command line, there's probably already a tool written which does it. That comes from maturity. Don't get me wrong. There is a lot I'd like to change with regards to command line usage and shell scripting (and I'm working on that ;)) but Powershell throws the baby out with the bath water. Though in fairness to Microsoft, they never quite had a mature command line prior to Powershell so there was no baby to throw out. But for Linux usage....no thanks.