To read all comments associated with this story, please click here.
One thing PowerShell has right is that it extends interprocess pipelining beyond simple text streams. If I had the time I'd love to take Bash, strip out some of the more arcane syntax and add the concept of structured data pipelining; imagine what you could do if you could get common commands to emit say, objects as JSON data and then manipulate them?
I would actually argue that the non-use of simple text streams is exactly what is wrong with PowerShell.
While I've used Bash for quite a while, I've tried to pick up PowerShell (namely to start replacing Batch scripts) and find it far easier to just use WSH+JavaScript that to interact with the PowerShell.
As with much of Microsoft Technology, it's way too complex to actually be useful and efficient.
now, the simple text streams don't eat much memory, makes interrupting things when you find what you need etc.
Like looking in some database thing and grep out of it. It's faster with bash, because it uses small pipes instead of buffering the whole stuff, even if the text is already there.It will presented at the end.
The biggest drawback is that large datasets will eat up all memory.
Powershell in it's best for is a small subset of what scripting can do under unix type of operating systems.
I think PowerShell may be a better SCRIPTING language, but I don't know if it's a better COMMAND LINE language. The terseness and expressiveness of the generic SH command line is very powerful. The additional lengths and complexity of the the elements in PowerShell warrant more an edit/run lifecycle than simply a type it and go and creating simple one offs that SH promotes.
I am curious as to why you find PowerShell have "additional lengths". I do a lot of scripting in PowerShell and I find that it is almost *always* shorter and more concise than the bash equivalent. Do you have any examples?
Also, I find PowerShell is *a lot* more consistent (naming conventions, parsing rules, parameter passing) with fewer specialized single-purpose features. Don't be fooled by PowerShell examples which (for instructive purposes) use the long-name versions of common commands. For the common commands there's often a short alias (which are a true aliases rather then bash "macro" aliases).
I like the that's it's object oriented, which opens up lots of cool things, but I find it too wordy and obtuse as well.
I don't think they went for simplicity with Powershell. I think they did a 180 from the DOS like cmd.exe, and created an alien shell with a bunch of complex tools. Powershell is Swiss Army knives and Erector set pieces, and the Unix shell is kitchen utensils and Legos.





Member since:
2006-07-14
PowerShell the MS CLI scripting language/environment was sorta kinda developed to be easier to use than good ole bash. They have longer command names to make things easier, work with objects instead of text. All things that make sense.
... Except I don't like it. Maybe its because I've been using bash forever. Maybe because I think its because in trying to be easier to use, its lost its simplicity in use. Ie faster to learn but more complex in the data structures = frustration some how. I can't really explain it. Its like trying to explain why 1+1 is not always two. Maybe I'm in a funky vector space with an non positive definite metric.