command line battlebots

Lucas Gonze lgonze at
Mon Jan 5 12:39:08 PST 2004

Looks cool: 
MSH takes the incredible power of the pipelined cmdlet approach of  
Unix, but instead of passing raw text, MSH sends NET Managed objects  
between cmdlets. That's right, objects, not raw text. Managed, type  
safe, and easy to write/extend .NET Managed objects! Now with such .NET  
objects, you get rich metadata available to the cmdlets. The MSH shell  
then uses .NET reflection to get this information into the cmdlet.

Now the format take a bit of getting used to, but you can type  
something like: "get /process" to get a list of processes running. You  
could string this together with the where cmdlet giving: get/process |  
where "handlecount -gt 500" to print out a list of processes with large  
handle counts.

This is sort of VB-ized version of something Unix has had for a couple  
years now:
Find all section titles in a DocBook XML:
xpath mybook.xml //section/title

The same command using a pipe:
cat files/mybook.xml | xpath //section/title

Retrieve just the significant text (not including nodes containing  
all-whitespace) from a given document:
xpath somefile.xml "//text()[string-length(normalize-space(.)) > 0 ]"

Still, an MS command line is a nice thing, the thing as a whole is a  
decent idea, and it seems like a Good Thing to bring a little  
VB-ization into the world of command-line interfaces.

- Lucas

More information about the FoRK mailing list