A Guided Tour of the Microsoft Command Shell
jpkunst writes "Ryan Paul at Ars Technica provides an in-depth, 13 page review of the new Microsoft Command Shell (Monad). (The beta release can be downloaded for free from Microsoft.) From the conclusion: 'Despite my initial skepticism, I am deeply impressed with MSH technology, and I am legitimately excited about the future of the Windows command line.'"
Everyone knows that "msh" really stands for "Microsoft Hell".
And what's with the "unleash" keyword? Do these people really think in terms, that glossy ads use to compare the advertised products with animals?
In Soviet Washington the swamp drains you.
We must have a working implimentation of this shell in Gnome immediately.
I propose we call it Gonad.
It will be the dogs bollocks.
Indeed, that MSH demo is impressive and all, but python is great too. System-wide integration? Big fucking deal:
>>> import kudzu
>>> kudzu.probe(kudzu.CLASS_HD, kudzu.BUS_IDE, kudzu.PROBE_ALL)
[Desc: MAXTOR 6L040J2 Driver: ignore
Device: hda , Desc: ST360021A
Driver: ignore Device: hdc
, Desc: Maxtor 6Y120P0 Driver: ignore
Device: hde ]
etc, and python is easily expandible to cover ALL the system. What makes MSH rock is that it's a python-like programming languaje PLUS a user-oriented (user=administrator) shell like bash. In linux we're used to program scripts with python, then pass the data through pipes to bash to do something with it. Crappy. When you have to do things like "command | cut -d ' ' -f 3 | cut -d ':' -f 1" to get some data, you know something is WRONG.
The cool thing about MSH that its a SUBSTITUTE to bash/cmd.exe, not a "complement" like python is. Is not that bash or python are bad, but bash-like shells are 30-years-old unchanged technology. Fortunately, there're people writing user-oriented python-based shells, like http://ipython.scipy.org/
Has any project been started to provide an open source clone, similar to what the Mono Project has done with .NET?
Cyric Zndovzny at your service.
Those who do not understand Unix are condemned to reinvent it, poorly.
-- Henry Spencer<br>
Usenet signature, November 1987
It's nuts
"Sure there's porn and piracy on the Web but there's probably a downside too."
Perhaps the Windows shell has finally reached the levels of goodness of that old shell, whatchyacallit. DOS, I think it was.
I forget what company it was that made that, but I'm sure if they were still around, they'd be doing amazing things. We can certainly agree that they'd without a doubt have a command line that would blow Microsoft's right out of the water.
xkcd.com - a webcomic of mathematics, love, and language.
Backslashdot
Specializing in Unix bashing (somewhat of an ironic statement)
the text-based shell is the nexus of computational control and the point at which proper articulation of will can transform commands into consequences Which leads to two questions : who wrote this shit, and were they getting paid per syllable?
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
A witty saying proves nothing.
- Voltaire
Taken from "system requirements"Requires the .NET Framework Version 2.0 Redistributable Package Beta 2 (x86) (see Related Downloads below).
Note that the "Supporting Operating Systems" list above is slightly wrong: the release is supported on Windows XP SP2, not Windows XP Embedded SP2.
Microsoft can't even get its own system requirements right... I someone expects a robust security infrastructure...
a...hmm...like a....
...massive security exploit waiting to happen. ;)
I'll stick with DOS batch scripts, thank you.
This sig rocks the casbah.
It's worth mentioning here that the real strength of the pipe is not "what you can pipe", but "what you can pipe things from, and to", and the fact that you can daisy-chain them together as far as you like. There are literally thousands, maybe tens of thousands of little tools and widgets that you can pipe information into and out of to achieve various effects. Regardless of what new things the MSH pipe can do, the unix world has a significantly larger toolbox.
Mike Hoye
A shell is nice but, can you change all the settings from the command line? The fact that most of your settings are stored in the registry, makes things a lot harder to do from the command line. Sure you could probably change a key or two if you needed to. But you'd probably have to know the exact location. Browsing the settings, to find the key you want, would be a lot harder. Can you install most programs from the command line, and manage all your installed software from the command line. I like the fact that in Linux, most base system stuff is designed so that it can be done by the command line, first and foremost, I like the fact that Linux stores all the settings in text files. This means that you can change the setting with any text editor of your choice. Also, there is a huge library of tools available at the command line. Not just stuff that was thought up by the people who made your command line (bash, csh, zsh), but also anybody else who made just about any other utility.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
Just a few days ago, there was another article on Slashdot about how Ballmer wants to "storm Linux." If they can convince *nix people that Windows has a powerful CLI, this will do much to suck them in... it is the "eye candy" for true geeks.
The article author starts to say this himself: My biggest frustration with MSH is the low quality of the actual shell interface. On my Linux system, I am extremely dependent on line editing keyboard shortcuts that simplify manipulation and alteration of command line input. MSH has very few line editing shortcuts, and extremely limited support for tab completion.
And I remember when CP/M was all the rage... *sigh*
$nice = $webHosting + $domainNames + $sslCerts
Yet again Microsoft takes an age-old technology, like scalable icons or transparency, and turns it into the best thing since sliced bread? Shouldn't they be condemned for leaving it this long to release a tool as powerful as this, instead of praised?
The best I can say is "It's about damn time".
C17H21NO4
Well it looks like C# will be alive and well for some time to come. This article definitely had the feel of Jesse Liberty's Programming C# OReilly book. .NET technology at the command line. Type casting is an easy way to transform a simple core type into a .NET instance or another core type. To cast an instance into another type, simply place the name of the desired type in brackets right in front of the instance. You can change a string into a number with an int cast:
" MSH has a number of unique features that make it easy for users to leverage
msh> [int]"5" + 5
10
"
is basically the section from the book on boxing and unboxing. Anyway, as a C# developer, it's great to see the language isn't dying..
~jennifer.k~
For a long time, it has been proud of his UI technologies, and thought the UNIX shells are too complicated to most people. As for the genernal people, it's right indeed; but it's not true for those developers that want to perform some customized tasks through some kind of relatively easy method.
The real problem is, Linux has been attracted more and more developers, it's absolutely dangerours to the Windows future. it must do something to change this situation, as a part of a series of actions according its plan.
-- forgive me my poor Engl...
>Unlike Linux command-line utilities, which contain their own argument parsers and output
>format mechanisms, MSH commands (called Cmdlets) all inherit a single base class, which
>ensures that all commands expose the same methods, parse arguments the same way
That's not entirely true about Unix (Linux): first, it omits to mention that Unix shells traditionally expand pattern matches in the given arguments, and match the command to an executable, before passing the arguments to that executable; and, second, everyone has used getopt(1) or getopt(3) (in whatever language) for years now, haven't they? (It's a common Unix newbie misapprehension to think that each executable has to expand the shell filename pattern matches in the arguments itself). These are a good start at maintaining command format consistency. I regret only that the original (Research) Unix didn't define which of: '-d -i' or '-di' and which of '-darg' or '-d arg' was preferable, and POSIX.2 (1991) appears (to me, glancing at it now) simply to have rubber-stamped the original situation.
4nt/bash + cygwin tools + python/perl.
I didn't get very far into the article before they got to the "we do things for you" part. Maybe I'm alone in this belief but I absolutely hate it when a language/shell/application will do things for me.
For instance (from the article):
MSH features the typical data types found in most other modern languages: strings, integers, arrays, and hash tables. When you enter any of those kinds of values at the command line, MSH will echo them back.
msh> "blah"
blah
msh> 5
5
By comparison, in the Bash shell, expressions are always treated as commands and the echo command must be called explicitly if the user wants to display a value at the command line.
If I want an echo statement I WILL TYPE echo! I don't want the software to ASSUME (make and ass out of me) if I make a typo!
Having to work for a living is the root of all evil.
Neither does one that is said by Voltaire.
-Suso
I kill me.
Seriously though, the design of MSH is odd. Their hybrid of paradigms from functional programming and OOP is just weird and inconsistent. Having completely different syntaxes for invoking "Commands" and "Methods" is obviously a byproduct of trying to have both a traditional shell syntax and OOPy goodness, without thinking much about internal consistency.
Typical Microsoft: very use-case focused, at the expense of helping their users build a consistent mental model of how their system works. I bet it's pretty hard to do anything in MSH that its designers didn't specifically anticipate.
Title says it all
Hypothetically: What if MS pulls it off and puts out the best OS that the Linux guys have ever seen. Let's say it's the Longhorn Server, WinFS, Monad, and everything MS has been touting works. Remember this is a hypothetical here so save the flaming/trolling for another thread.
Will the Linux guys at that point stop bashing MS? Will you consider using the MS OS? Now I understand you don't trust them, but how will you respond if you can't say their product sucks? Will the comments be, "Ya they make the best OS, but they are evil?" Or will you continue to say that "Windows is just crap because they don't share the kernel source?"
We are starting to see more and more people say that MS is doing a good job (like the parent thread here), and much to my surprise they are starting to open up their formats and products a little (not completely I know, but moving towards that direction). By all accounts it looks like for the next 18 months MS will be releasing some decent software, most of it strides ahead of the OSS available. Not to say that MS isn't catching up to SOME open source products... but that's fine, they should add the best features to their product, why wouldn't they?
Just an honest hypothetical here, I'm not trolling or anything, I'm trying to understand your stance a little better. The standard cliché response of "MS is a monopoly and EVIL" is fine, but I was hoping for more thought provoking responses.
it would finally be ready for the desktop.
when will the linux devs get on the ball its 2005 the new wave of computing is the command line.
who says microsoft doesnt inovate.
Thank you Microsoft for updating the "DOS" shell. Us command-line jocks really do appreciate it. They were even nice to us switch-hitters in that "cd /windows/system32" (note the forward slashes) actually works now. I guess they concede they lost the slash wars after all these years :)
But seriously. After spending in any time in a Linux or OS X sexy, semi-transparent shell windows, with a nice courier font and syntax highlighting, Monand (as it is now) still runs in the gross 1982 DOS window?
I hope this changes come Long^M^M^M^M Vista
It looks just like eval.rb the interactive ruby shell:
http://www.rubyist.net/~slagell/ruby/strings.html
ATH0 Bitcoin: 1DnwFLXczVZV8kLJbMYoheUrpqHesjxrSi
Wait wait .. so ... when Microsoft does something interesting (it happens) and it's remade in whatever OSS flavor of the month, that's cool.
But if Microsoft remakes something interesting made by OSS it's stealing.
I thought, in both cases, it was a matter of reverse engineering and clean room implementation.
We do not live in the 21st century. We live in the 20 second century.
I'm on page 6 already and I must say I start liking msh more and more.
It's completely un-microsoftish!
- It's very easy to shoot yourself in the foot. Extremely easy - anything that is not a command is an expression that is evaluated, so a typo may pass unnoticed and without a warning.
- It provides lots of sweet syntactic sugar making things easy and terse while not overly obscuring them.
- It takes some of the best from lots of other languages. Shamelessly too. ($_, select, | etc)
- It makes some evilly hack-friendly assumptions ("current instance" is the current directory)
- It will likely suck as an interactive shell, but makes simple scripts to automate system tasks obscenely easy. Likely, no more repeating 1000 times "click add user, type username, type password twice, mark 'Password never expires', enter Groups, select 'staff', click 'add group', click OK, click OK".
It really looks like the project was created by the programmers while the management was on vacations, then all the details hidden and managers just fed with marketspeech while programmers worked on a tool that would finally make THEIR OWN life easier, instead of just appealing to managers of customer companies and making programmers' life more painful.
Anagram("United States of America") == "Dine out, taste a Mac, fries"
I was thinking that microsoft would never provide such a thing, but only the unusable DOS/cmd.exe prompt, to make windows users think that "operating systems based on the command line are very difficult to use" :)
I'm now interested to see how it maps with gnu bash, if it tries to superseed it with features or will be vaguely compatible with it...
Nice!
Wondering why i am doing so strange posts? I am trying to get a "+5,Flamebait" or "-1,Insightful" rating.
Nothing new. Go back and read a few older Ars articles, like the ones about the PS2, or the POWER architecture. Ars always produces very high quality writing, but they obviously write about things they think are really cool, hence they often give an over-positive spin on things.
Try out fish, the friendly interactive shell.
320 MB? Where in hell did you see that? The .NET Framework Version 2.0 Redistributable Package Beta 2 weighs in at 22 MB. Still hefty, I grant you, but certainly not 300+ megs.
a milyid=7ABD8C8F-287E-4C7E-9A4A-A4ECFF40FC8E&displa ylang=en
.NET 2.0 apps. The framework is this big collection of shared libraries used by all .NET apps whether they are C++, C#, yadda yadda yadda... You get the gist. No worse than getting Java, really. MSH is just implemented using .NET, basically. The 1.1 framework stuff is built into XP's Service Pack 1 and later, and I'm sure that the 2.0 framework will be built into Vista.
http://www.microsoft.com/downloads/details.aspx?f
Now, for a command line, I grant you, that's heavy. But a) It's still beta and b) It's the framework for all
- Give a man a fire and he's warm for a day, but set him on fire and he's warm for the rest of his life.
It doesn't seem to be much better cmd.exe other than it actually supports UNC paths. That was one thing that always pissed me off about cmd and cygwin. How can you NOT support UNC paths in windows 98+?
-TheDawgLives suckitdown
This download offers you the benefits of registering with Microsoft. Click the Continue button near the top of this page to register.c 8ff-c4eb-41f3-884e-981bf39997b7/monad_b2_50215_x86 .zip
2 6fea1-723d-4bd6-93c1-19d681af9276.aspx
no thanks, I would rather just download it.
http://download.microsoft.com/download/7/4/6/746e
taken from
http://www.leeholmes.com/blog/CommentView,guid,8b
(which also has the 64 bit version)
ERR 411[Max number of witty sigs reached]
Great! Now, we can easily write a script to convert all Office (Word / Excel, etc) to the OpenDocument formats!!!
IPython is a free software project (released under the BSD license) which tries to:
Just in futzing with it for a bit I have some major beefs here. Yeah I know its just beta and that some if not all of this stuff is in flux but this is what I noticed.
.NET IDE... why not adapt that for a cmd line interface ? ie pull down lists of functions with a properties windows and the ability to explore the help information and view examples ? All in a tabbed interface. Sweetness.
1) They still have the problem of cuting and pasting GUI environment info to the cmd shell window.
2) They are still limited to crappy display levels for the cmd shell window
3) If your building a verbose object oriented language you need a better refferencing system. Insane long wordy names are in theroy good and makes learning easier. But for repetative stuff it gets old typing them. Sure you can denote aliases... but why not always denote one by default? Just establish a best practices for creating a unique shorthand of the longer name.... and build it into the script to check with help to make sure its not walking on anything else. I garountee anyone that uses this thing for any length of time is going to create a shorthand for it... if there is one by default it will make it easier for people to talk it without first establishing what they all call their aliases for which function.
4) More works but is not listed under help. It has a flaw in that when you advance a single line it continually types the instructions just under the new line without deleting the old line... ie if you advance by line you then have alternating document info and instruction lines rather than the document txt incremeting above the instruction line ie...
(q)for quite (cr) for next line (space) for next page
Line of text from the file
(q)for quite (cr) for next line (space) for next page
Line of text from the file
(q)for quite (cr) for next line (space) for next page
Line of text from the file
Extremely annoying.
Some other thoughts.
Why are they trying to limit themselves to creaky old txt displaying methodologies ? Yes a command line consists of text information primarily but the reason it evolved in such a constricted interface was that there was no other option at first. Just because it is a command line does not mean it could not also be a gui. Give it the power of both. For instance lets say I open my computer. I get the standard drive icons etc and at the bottom I get a prompt. If I double click C or type cd c:\ at the prompt the same results happen on screen. Lets say I drag a file down to the command line.. now a token appears there for dealing with that file. I have a graphical rpresentation as well as text information and I can interact both with a mouse and with cmd line input.
Additionally they spent a crap load of time developing a pretty slick interface in the Studio
The marriage of the command line and the GUI is the next generation. It does not have to be EITHER OR. Both have strengths and both have weaknesses. Instead of being stuck with one or the other create a system that allows you freedom to use both sets of strengths to offset the others weaknesses.
I don't ask you to be me. I only ask you not expect me to be you.