Hacker News new | ask | show | jobs
by throwaway7645 3205 days ago
In my small experience no. Linux is super powerful. It is darn simple to pipe commands to each other and always know the output is text. Powershell passes .NET objects, so even if you think you should be able to easily pass the output from one command to another, in reality it doesn't work out nearly so well and puts a lot of cognitive load on me for even simple things. For complex things, the language is much nicer than BASH, but that is irrelevant as most people aren't using BASH for the complex stuff. I use the full range of Linux commands for simple stuff and use Python or Perl for the more complex stuff. I really want to like PS and have put a lot of time into it, but in the end I only see it filling the role of someone scripting the deployment of user permissions and server configurations. So it is great for a very small subset of IT work, but doesn't give the user the power over general OS use like Linux does.
2 comments

For something in-between the two the Xonsh shell might be nice. It's basically a Python-based shell with full access to Python for scripting purposes.

I like Bash but writing anything remotely complex in it is... not recommended

I'll have to check it out, but usually for the easy stuff, the standard commands like grep + Awk is more than enough.
CMD is for simple things, PowerShell is made for complex things.
I disagree. CMD can't even do simple things. Sure it can list the files in a directory and write that to a text file, but not much more. I'm exaggerating some, but CMD is so underpowered compared to what you get in any Linux terminal that this isn't a fair comparison.
Of course it is underpowered compared to what Linux offers. The main point is that Powershell isn't designed for Bash-like scripting.
I'll cede that. So Windows really has no way for the user to do things easily though. There is no middle ground between CMD & Powershell. I think they could fix that by putting in all the Linux commands people care about and make it easier to return the object as text without writing a novel. The aliases are only helpful if they can still pipe like Linux.