By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,271 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,271 IT Pros & Developers. It's quick & easy.

MSH (shell)

P: n/a
This can be of little interest of some people here, but I think it can
be interesting enough to justify a post.

An article on the Microsoft Command Shell:
http://arstechnica.com/guides/other/msh.ars
(Its syntax is rather Python-like, but Py syntax seems better to me,
even taking into account that their purposes are a little different).

Other info:
http://en.wikipedia.org/wiki/MSH_(shell)

Something vaguely similar made with Python:
http://geophile.com/osh/index.html

Bye,
bearophile

Oct 27 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
be************@lycos.com wrote:
This can be of little interest of some people here, but I think it can
be interesting enough to justify a post.

An article on the Microsoft Command Shell:
http://arstechnica.com/guides/other/msh.ars
(Its syntax is rather Python-like, but Py syntax seems better to me,
even taking into account that their purposes are a little different).

Other info:
http://en.wikipedia.org/wiki/MSH_(shell)

Something vaguely similar made with Python:
http://geophile.com/osh/index.html


Kamaelia's Axon Shell[*] is also very similar. An Axon scheduler runs as a
background thread to an IPython interpretor, allowing you to "launch"
Kamaelia components interactively, including both pipelines and Graphlines
of components.
[*] http://kamaelia.sourceforge.net/AxonShell.html

But then Kamaelia IS designed as a pipeline/graphline (1d,2d,n-d) system
from the ground up, so having a shell for it was a logical step :-) ...

I suppose the difference between python and MSH is you don't need a separate
language, maybe a module or three, but you don't need to modify the
language :)

Michael.

Oct 27 '05 #2

P: n/a
Thanks, I'm enjoying reading the article.
So far I noticed how their select functionality is similar to our
comprehensions, but can also take a statement block. ( no wars please
;-).

I liked the tabular output format for lists of similar items, with the
automatic headings being displayed, e.g:
msh> get-childitem | select name, extension, {
if ($_.LastWriteTime.year -lt 2004) { "old file" }
else { "new file" }
}

Name Extension if
($_.LastWriteTime.year...
---- ---------
-------------------------
examples.txt .txt new file
output1.html .html old file
output2.html .html old file
somefile.doc .doc new file
I tend to avoid xml but their xml example below was succinct and
relatively painless. Do python libraries allow a similarly readable
version of their:

msh> $x = [xml]"<zoo><animal
kind='monkey'><name>Albert</name></animal></zoo>"
msh> $x.zoo.animal

kind name
---- ----
monkey Albert

Their "Extract the title and author elements from every item in the
rss.channel tag" example is also impressive.

Looks like an innovative new shell.

- Paddy.

Oct 28 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.