PowerShell vs Bash

The cluster focuses on debates comparing PowerShell to Bash and other Unix shells, emphasizing PowerShell's object-oriented approach, syntax, and advantages for scripting over text-based piping in traditional shells.

📉 Falling 0.2x Programming Languages
3,613
Comments
19
Years Active
5
Top Authors
#8964
Topic ID

Activity Over Time

2008
12
2009
26
2010
37
2011
45
2012
70
2013
99
2014
121
2015
297
2016
389
2017
273
2018
197
2019
177
2020
325
2021
370
2022
274
2023
402
2024
337
2025
140
2026
22

Keywords

MS REPL e.g IMHO CLI CSV IDE UNIX PATH XML powershell bash windows objects unix commands cygwin text python awk

Sample Comments

kojiphilippines Sep 16, 2024 View on HN

The thing I love about powershell is that you don't have to learn any DSLs, unlike bash, zsh, and the like. Want to manipulate some structured text data? Convert it to a native object, modify it using powershell syntax, and convert it back to the original data format. If you want to do this in bash, you have to learn the syntax and parameters for many utilities like jq, awk, starletxml, and many others. Also, unlike bash, you can use the output of commands like ls directly without worrying

haolez Oct 31, 2022 View on HN

What benefits do you see in PowerShell comparing to things like Bash and Python? Genuine curiosity.

fetbaffe Oct 29, 2014 View on HN

I have tried PowerShell a few times but I can't never appreciate it.Yes, it technical superior than it's counterparts on Linux by piping objects instead of mangling text, but the syntax of PowerShell is just too convoluted.I have concluded that when doing command line you want to write commands and not program code to execute.That's why bash is usually straight on and powerful for the 95% commands you do. It's edge cases when you need to do horrible awk pipin

tacticus Oct 8, 2015 View on HN

Why are you comparing powershell to bash. the more accurate comparison is python.

Devagamster Nov 19, 2016 View on HN

You seem to be missing the fact that powershell is just designed better. Take powershell vs bash. Bash operates primarily on strings. In powershell everything that is interacted with is an object. This wont really effect you in day to day interactions, but it is incredibly useful when you decide that you want to automate something. This combined with the fact that powershell is built on the .net framework means that there is a simple way to extend it from C#. You should give it an honest try som

HyperSane Oct 27, 2022 View on HN

sh and bash feel pretty primitive after learning PowerShell.

pxc Aug 13, 2024 View on HN

I love PowerShell, but I've yet to meet someone who 'lives in' PowerShell the way so many 'live in' Bash and the various GNU CLI utilities, which I think inhibits familiarity of the kind most convenient for whipping up quick scripts like that.That said, PowerShell is much more a 'real programming language' than the shell languages that came before it. PowerShell scripts are a lot more maintainable that scripts written for those other shells. And there are so

DaveMebs Mar 24, 2012 View on HN

It's amazing how many people either dismiss PowerShell out of hand because it's different, or don't even think about it when talking about Windows commandline support. Getting .NET objects returned, rather than piping text around is awesome. So is having an IDE specifically for writing PowerShell scripts. I'm still learning PowerShell, and love bash, but as powerful as bash is, in some ways it feels very primitive in comparison. If PowerShell 15 years old when bash was released, would anyone<

InclinedPlane Aug 25, 2015 View on HN

I've lived in both the windows and linux/unix worlds and I will say that powershell is a better scripting language than bash. Bash is ok, but powershell is nicer. Powershell is sort of like python in that it tends to force down a path of doing things in a certain way.Powershell isn't just "more tools and glue for windows stuff", it's a different way of doing things. In powershell you get named command-line parameters for free, that's a huge win. You get usag

ygra Jun 3, 2015 View on HN

Probably not. In my experience it's not so much about things being impossible elsewhere, just that PowerShell can often be better at fiddling in a REPL until you got the results you wanted, in a way. The point where you need (or want) to upgrade to a more powerful language is IMHO earlier in bash than in PowerShell².PowerShell handles objects like Unix utilities handle text. You get a lot more orthogonality in commands, e.g. there's just a few commands dealing with JSON, CSV, XML, e