I've been using the Unix shell for years and working on a Windows box is always a frustrating experience in comparison. However, in the last week, I've downloaded an RC for Monad - or Powershell as Microsoft are officially calling it.
My first impressions? Monad is the best thing I've used this year!
There are a couple of things about it that I like: The logical naming of commands (or cmdlets as they are known). This takes the form of a verb-noun, for example, get-process, sort-object etc.
The second thing is that Monad passes objects instead of strings.
Imagine the output of the "ps" command. A set of tabulated data including process name, parent PID, PID etc. This can be passed to other commands, but it's all in the form of a string. The output of a the get-process cmdlet is an object, where the methods can be executed, or properties pulled out.
An example - to get the process name, PID and number of file handles of a machine, sorted by the number of file handles would be: get-process | sort-object handle
Very logical, very simple, very powerful.
It's taken a long, long time, but Microsoft appear to have matched (exceeded?) the Unix shell.
As an aside, the O'Reilly book on Monad is very easy to read, especially if you have an understanding of Unix shells.
Post a Comment