|
|
Subscribe / Log in / New account

Evolution of shells in Linux (developerWorks)

Evolution of shells in Linux (developerWorks)

Posted Dec 8, 2011 20:10 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)
In reply to: Evolution of shells in Linux (developerWorks) by cmccabe
Parent article: Evolution of shells in Linux (developerWorks)

Not really. PowerShell allows bidirectional communication while Unix pipes are traditionally unidirectional. Also, having all commands executing in the same address space is quite useful for a lot of stuff - I can pass gigabytes of image data without having it copied through pipes.

But yes, internally PowerShell is just a REPL console for a statically typed language with good introspection capabilities.

It's just cleanly implemented and with a lot of functionality. There were several attempts to do it in Unix but they died for a lack of infrastructure.

You can work with byte streams in PowerShell but it just feels unnatural after working with typed and structured objects.


to post comments

Evolution of shells in Linux (developerWorks)

Posted Dec 8, 2011 21:06 UTC (Thu) by cmccabe (guest, #60281) [Link] (3 responses)

> But yes, internally PowerShell is just a REPL console for a statically
> typed language with good introspection capabilities.
>
> It's just cleanly implemented and with a lot of functionality. There were
> several attempts to do it in Unix but they died for a lack of
> infrastructure.

Well, Perl, Python and Ruby don't seem dead to me. Yes, it would be nice if they supported static typing, but that's a different conversation.

> PowerShell allows bidirectional communication while Unix pipes
> are traditionally unidirectional. Also, having all commands executing in
> the same address space is quite useful for a lot of stuff - I can pass
> gigabytes of image data without having it copied through pipes.

Solaris had (has?) bidirectional pipes. Linux never implemented that, and it's probably a good thing on the whole.

The thing that I think you are missing is that a good shell needs to be designed to be useful to system administrators, not to programmers. Good programmers may be able to debug the race conditions, misconfigurations, and so forth that can result in bidirectional communication between modules. But system administrators will find the extra complexity to be a huge burden.

The genius of UNIX was that it tore down the wall between system administrators and programmers. This meant allowing visibility into the guts of the system. It meant that sysadmins could automate common tasks. Does PowerShell allow users to do that, or is it just another shrine built to another proprietary Microsoft programming framework?

There have been so many of those over the years-- OLE, COM, DCOM, ActiveX, etc. Ironically, the number of dead proprietary Microsoft programming frameworks is almost greater than the number of living open source ones!

Evolution of shells in Linux (developerWorks)

Posted Dec 8, 2011 21:24 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link] (2 responses)

>Well, Perl, Python and Ruby don't seem dead to me. Yes, it would be nice if they supported static typing, but that's a different conversation.

I'm talking about _shell_ in Python/Perl. I'm aware only of http://code.google.com/p/hotwire-shell/ which is kinda still alive, but not very active.

Also, static typing is essential for PowerShell because it allows to have full automatic introspection. So I can tab-complete LINQ queries without any additional hackery like in bash_completion.d

>The thing that I think you are missing is that a good shell needs to be designed to be useful to system administrators, not to programmers. Good programmers may be able to debug the race conditions, misconfigurations, and so forth that can result in bidirectional communication between modules. But system administrators will find the extra complexity to be a huge burden.

Good Windows sysadmins _love_ PowerShell, because it makes a lot of jobs easier. Also, a lot of companies start building their tools around it. VMWare has _very_ nice management interface for PowerShell, for example.

>The genius of UNIX was that it tore down the wall between system administrators and programmers. This meant allowing visibility into the guts of the system. It meant that sysadmins could automate common tasks. Does PowerShell allow users to do that, or is it just another shrine built to another proprietary Microsoft programming framework?

PowerShell is really a logical extension of Unix ideology, so it has all the advantages of Unix.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 2:31 UTC (Fri) by ccchips (subscriber, #3222) [Link] (1 responses)

I think I'll believe that when I can do:

[get a list of all computers that have tape drives] | [get-tape-label]

from Powershell against any of the many proprietary backup programs Windows users are faced with....

Will companies like CA, Seagate, GFI, and others rally 'round this object model and help us get our work done *without* using their stupid GUI applications?

I have my doubts, but go 'head, keep on truckin'.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 3:15 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

You're in luck.

We use http://www.veeam.com/ for VMWare backups. Works like a charm.

I have no idea how it works with tapes (I've not seen one for more than 10 years), but it can certainly list the targets for backups with a simple command.

So now please show me how to do this in Bash. For DriveXML working inside a VMWare virtual machine.

Evolution of shells in Linux (developerWorks)

Posted Dec 9, 2011 20:20 UTC (Fri) by ccchips (subscriber, #3222) [Link] (2 responses)

> PowerShell allows bidirectional communication while Unix pipes are traditionally unidirectional.

Can you give us some examples or links to some examples of this bidirectional communication and its advantages/disadvantages? Only thing I have found so far is that you can use a .net class to set up a named pipe.

Evolution of shells in Linux (developerWorks)

Posted Dec 10, 2011 3:08 UTC (Sat) by Cyberax (✭ supporter ✭, #52523) [Link]

Bidirectional pipes are rarely used in PowerShell - it's a minor feature. More exactly, you can provide your own implementation for a pipe. Including pipes that use pigeon mail or encode data as smoke signals.

Evolution of shells in Linux (developerWorks)

Posted Dec 16, 2011 3:56 UTC (Fri) by useerup (guest, #81854) [Link]

I believe he may be referring to the fact that PowerShell not only allows objects to be passed through the pipes, but also allows you/the script to actually *interact* with the objects, ie calling methods.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds