Welcome to MSDN Blogs Sign in | Join | Help

Bash vs PowerShell

Marcus Nasarek did a nice comparison of Bash vs PowerShell in Linux magazine HERE.  It is only 2 pages but he covers the key elements and has been very fair to it.  I appreciate the fact that he took the time to clearly understand PowerShell.  In the past, a number of people in the Linux community have assumed they knew what we were doing and did comparisons based upon their assumptions.  Those weren't very interesting.  

Enjoy! 

Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Published Tuesday, July 08, 2008 4:40 AM by PowerShellTeam
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# a-foton » Bash vs PowerShell

Tuesday, July 08, 2008 1:06 AM by a-foton » Bash vs PowerShell

# re: Bash vs PowerShell

Hope MS is adding a GUI based on PowerShell to compete with Automator.

Tuesday, July 08, 2008 1:42 AM by anonymous

# re: Bash vs PowerShell

The article isn't entirely accurate about the object pipeline, though maybe it's doing the best it can in the space allowed. It talks about output being converted to objects, when it's the other way around: objects are converted to text for display.  Also, the article says "passing data objects is slightly more complex." I don't agree.  I imagine someone could use PowerShell for quite a while before realizing that it passes objects around, especially if they're expecting traditional shell behavior.  They'd have to read the documentation to know there are objects flying around.

Tuesday, July 08, 2008 9:27 AM by John Cook

# re: Bash vs PowerShell

Maybe Automator can be replicated by Citrix Workflow Studio?

Tuesday, July 08, 2008 4:08 PM by Anonymous

# re: Bash vs PowerShell

I have read this is this seems so biased towards PowerShell. The fact is, I think the author is comparing on features that make no sense in comparing.

The pipe, in Unix, sends the standard output of the command on the left to the standard input of the command on the right. This involves creating two processes and changing standard file descriptors. It is the way Unix is written from scratch to do. PowerShell, on the other hand has "cmd-lets"... Someone please explain me what is this other than builtins in bash? This involves no interprocess communication, as it is executed in the process context of the shell itself.

Everyone I know is just marveled when PowerShell is mentioned, when Unix shell has been capable of doing te same things for more than 30 years. Please, wake up people.

Everyone is missing the point with this PowerShell thing. This is just another shameful plagiarism from Microsoft.

Tuesday, July 08, 2008 7:19 PM by António Trindade

# re: Bash vs PowerShell

the marvel of powershell isn't an anti-unix thing. It has nothing to do with unix. We're delighted to have its capabilities in windows. Ok, unix has had a great shell for years - that hasn't been especially helpful if you need to manage windows. Now windows has a great shell - if concepts were adapted from unix, take it as a compliment. Various unix shells have borrowed from each other for decades - so what if windows' shell borrows some concepts and techniques, too? Don't take thus as powershell vs. Bash; take it as "is windows finally getting a good shell? Let's compare it to a known-good shell and see."

Tuesday, July 08, 2008 11:37 PM by don jones

# re: Bash vs PowerShell

Because I work a lot with *nix and shells, I like the concept of classified data streams. A kind of extension for bash or other shells would be great.

Wednesday, July 09, 2008 3:56 AM by Karl-Heinz

# re: Bash vs PowerShell

Then why is it named "powershell vs bash" uh ?

obviously the review is very short and mentions nothing special , actually. It doesn't mean powershell is bad, but the review definitely is! It looks more like a "let put something about powershell it'll fill our pages".

I especially like the fact that you can use objects, but, is it really useable. Dont know. Guy took the samples from the powershell demos.

What if you cannot have cmdlets from program to program? etc.

Wednesday, July 09, 2008 6:25 AM by bob

# re: Bash vs PowerShell

Don Jones is right. I say this upfront to try not to start a flame war.

I just criticize the PowerShell guys I talk to, because PowerShell is, in fact a shell that Windows should have had for a long time.

However, what ticks me off is the fact that they refuse to recognize that they borrowed a lots of features and ideas from Unix, and that their shell is the best. As usual, I see no technological innovation from Microsoft. In fact, I think they stopped innovating since they launched Windows 95.

Still speaking of shells, has anyone here ever heard of JP Software 4DOS/4NT. I've used these back since I used Windows 3.1. Microsoft should have learnt from them.

Wednesday, July 09, 2008 6:28 AM by António Trindade

# re: Bash vs PowerShell

Hmmm... Not happy with this an article. The conclusion seems to side step the thrust of the article - Bash Vs Powershell. Definitely pulls its punches at the end.

Is calling Bash "plain" and then advocating the use of Python and Tcl/tk - for more complex cases - an admission that Bash now looks old?

At the very least - I'd say this article is a good short introduction to powershell, and Don Jones is right. Windows does finally have a good shell.

Besides... I'm looking forward to the eventual article - Powershell Vs Python.  ;->

Cheers,

  Rob Lancaster

Wednesday, July 09, 2008 6:30 AM by Rob Lancastet

# @ anonymous, Anonymous

How is Visio?

It can cook PoSH scripts and documents with this addon.

http://www.microsoft.com/japan/windowsserver2008/powershell-tool.mspx

...Although it is Japanese based ;)

Wednesday, July 09, 2008 9:25 AM by Smith Catar

# re: Bash vs PowerShell

>> In the past, a number of people in the Linux community have assumed they knew what we were doing and did comparisons based upon their assumptions.

For those who actually understand PowerShell or just makes them loose credibility.

Anyway, I'd be interested in seeing (no-follow) links to some of those, just for rubber-necking sake.

Thursday, July 10, 2008 3:08 AM by Mike Schinkel

# re: Bash vs PowerShell

António:  

I think you are being extremely unfair and unwilling to realize what is both unique and powerful about PowerShell.  And this from a web/database developer who has moved completely off Windows+IIS+ASP(.NET)+SQL Server to LAMPhp for the past two years with no looking back.

But I still use Windows on my laptop and I'm AMAZED with how good PowerShell is. You giving PowerShell its due will take nothing away from *nix shells.

Did your mother not read "Green Eggs and Ham" to you when you were but a lad?

Thursday, July 10, 2008 3:12 AM by Mike Schinkel

# re: Bash vs PowerShell

Rob>> I'm looking forward to the eventual article - Powershell Vs Python.  ;->

Those are my too favorite languages, but Python wins out.  Actually, PowerShell would beat Python by a nose, if and only if you could build real web apps with PowerShell...

Thursday, July 10, 2008 3:15 AM by Mike Schinkel

# re: Bash vs PowerShell

I had to comment on this one:

> However, what ticks me off is the fact that they refuse to recognize that they borrowed a lots of features and ideas from Unix

My friend, you have your facts wrong.  We have been, are, and will continue to be, very publicly grateful to all the great efforts that went before us.  We have benefitted greatly from Unix, VMS, AS400, TCL, and many others.  Those guys are my heros!

If you search "SNOVER" and "UNIX" - you get a low signal-to-noise ratio but go search "SNOVER" and "VMS" and you'll find plenty of big hugs and sloppy kisses.

Next - read Bruce Payette's book.  He is absolutely unambigous about this point.  I forget his exact works but it was something to the effect of, "we tried to reuse as much as possible and invent as little as possible".

You can throw rocks at us but you can't say that we aren't open about our respect and admiration for the superstar engineers from other communities.  Well, you can say it but it's not true.

Jeffrey Snover [MSFT]

Windows Management Partner Architect

Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell

Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Thursday, July 10, 2008 9:07 AM by PowerShellTeam

# re: Bash vs PowerShell

> Powershell Vs Python

That's interesting. Why would you say Python vs Perl?

Jeffrey Snover [MSFT]

Windows Management Partner Architect

Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell

Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Thursday, July 10, 2008 9:10 AM by PowerShellTeam

# re: Bash vs PowerShell

> That's interesting. Why would you say Python vs Perl?

what? is this kind of let-us-start-flame-war-day?

Tuesday, July 15, 2008 11:11 AM by yidingz

# re: Bash vs PowerShell

Just because someone uses the words "noun1 vs noun2" does not mean "OMG FLAME WAR!".  Really, that's in the eye of the beholder.  In other words, flame wars are caused by war-like people.  But that is beside the point.

Point I wanted to make is that as a fellow 4DOS/4NT user from waaaay back, sure I can sympathize with the comment "Windows should've had this all along".  From what I understand from talking to Jeffrey about this, it was a political issue and most definitely not a technical issue.  People who...what's a polite way to say this...have not been in the workforce may not understand this concept.

That being said; PowerShell is here and it's here to stay.  It knocks the socks off of cmd.exe and vbscript and apples-to-apples I think no other _shell_  comes close to its usability and functionality.  When you change that comparison to "scripting language", you are looking at a different thing and the pros and cons and applicability become more complex.  Even so, I think Jeffrey and his team have created a new model (OO scripting lang+shell) which sets the new bar for everyone else to plagiarize.  :)  Case in point--http://pash.sf.net.

Friday, July 18, 2008 8:25 AM by Hal Rottenberg

# re: Bash vs PowerShell

Powershell: ssh - some erros (should be 'command not found')...

where is ssh to get to a real unix/linux machine ? It's a JOKE!

Friday, July 25, 2008 7:20 PM by alexit

# re: Bash vs PowerShell

I live under a rock, and generate my own electricity by catching electric eels in a bottle; I tell you this so you'll understand why I only just installed PowerShell tonight. It's wonderful.

As a newbie, I found the bash v. ps article helpful, mostly because I'm familiar with bash and wanted some way to get oriented to the new shell. Was the article incomplete? Sure. Was it biased toward PowerShell? Maybe, but that's not important to me.

Thanks for pointing out the article

Friday, August 01, 2008 9:40 PM by Doug Brower

# re: Bash vs PowerShell

Use Cygwin instead for windows!

Tuesday, September 16, 2008 4:38 PM by SomeUser

# re: Bash vs PowerShell

Bash: commands are there, they tend to increase by time with adding of many applications etc. There's a sense of continuity.

Commands are compact e.g. ls, mv, rm etc. This favours speed

Colours are utilised in bash, bash is case sensitive for greater varitiety

PowerShell: This concept is muffled with the developement e.g. commands like dir/w, deltree, etc. So - personally - the sense of continuity between MS-DOS and PowerShell is weaker than various bash shells

Commands are more in a sentence structure verb-noun: e.g. Get-Item. This favours linguistic coherence. Alias is a compromise for covering this gap.

Colours are not utilised (not to my knowledge), PowerShell is not case sensitive for ease of usel

Friday, September 19, 2008 8:12 AM by comparative

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker