4 ms·
Well, first, the object-orientedness of powershell is just one more layer. You can work on a text-based basis in powershell, just send out strings :P On the ot
by Raphael_Amiard 16y ago
Well, first, the object-orientedness of powershell is just one more layer. You can work on a text-based basis in powershell, just send out strings :P
On the other hand, this very feature of powershell is amazingly powerfull, and allows you to lay out some things fare more logically than you could/would do in a text based shell, not to mention purely interface with more complex applications written in .net flawlessly (like doing a small GUI for your script in five seconds for example).
When you work with text, you're basically reinventing parsing at every pipe, and that, too makes no sense at all, for certain applications.
EDIT: What you said just reminded me of something on dadgum
http://prog21.dadgum.com/74.html http://prog21.dadgum.com/74.html.
- fauigerzigerk 16y agoIf all programs I'm connecting are .NET based and hence share a common type system, why would I need a shell script at all? I don't see the point of inventing yet another programming language for that purpose. I could just as well use any existing .NET based language to do the same thing. Apart from that, the power of the Unix shell isn't primarily the shell scripting language itself. It is the design of the programs it connects. You need small programs that do one thing. Windows software isn't built like that (neither is Java software by the way), so it doesn't matter much what the quality of the shell is I think.
- Raphael_Amiard 16y ago>If all programs I'm connecting are .NET based and hence share a common type system Well to set it apart from C#/F#, Powershell is dynamically typed, so you don't have to bother with the types of your objects. To set it apart from Ironpython/ruby, or any other dynamic languages on the CLR, Powershell is made to be a shell scripting language. It means that tasks common in system administration are made to be simplified, that command to deal with the filesystem, processes, services and anything else on the system are builtins, and that it interacts very well with other apps, all things that are definitely not true with python or ruby. ipython brings you an inch closer, but with powershell you have the full thing. > Apart from that, the power of the Unix shell isn't primarily the shell scripting language itself. It is the design of the programs it connects. You need small programs that do one thing. Well those programs (grep, awk, sed, cat, and many others) are meant to be used in a shell environnement. With powershell, most if not all of the utility of those commands is replicated in equivalent commands. Those are not binary executables, but built-ins commands. But you can add new ones very easily, by coding them in powershell itself and adding them to your environnement in a way that has been thought out for that very purpose. I see no diminution in power, quite the contrary. But i see no real interrest in preaching to somebody who has already made up his mind. All i can say is, if you have the occasion to try it extensively, you really might change your mind on the subject :)
- nailer 16y agoYour compare shell apps to cmdlets, which indeed are single function apps (like get-proces aka ps).