Thursday, November 23, 2006

About Time

The glorious end to text-based command line environments is around the corner:
Commands are not Text-based
Unlike traditional command-line interface commands, Windows PowerShell cmdlets are designed to deal with objects - structured information that is more than just a string of characters appearing on the screen. Command output always carries along extra information that you can use if you need it. We will discuss this topic in depth in this document.
If you have used text-processing tools to process command-line data in the past, you will find that they behave differently if you try to use them in Windows PowerShell. In most cases, you do not need text-processing tools to extract specific information. You can access portions of the data directly by using standard Windows PowerShell object manipulation commands.

This was taken from the documentation for Microsoft's PowerShell. All I can say is: FINALLY! Tools like grep have their place, but man, working with objects is so much nicer. I just started to look into this, but I'm liking it thus far. I've been waiting forever for a command line environment that dealt with objects instead of dumb old text.

1 comment:

Vincent Foley said...

It's nice, but I wonder how one writes an application that easily pipes data from another program. Do you need to use .NET for both applications or use a set of PowerShell libraries? Text is harder to manipulate than objects, but text is easily manipulated in different languages. I can write a Perl script that takes the output of a Ruby script and sends the result to a Python script.

Is that sort of interoperability mentioned?