A Guided Tour of the Microsoft Command Shell 519
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.'"
Who wrote the introduction? (Score:4, Insightful)
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?
impressive (Score:4, Insightful)
>>> 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/ [scipy.org]
Some Wise Man Said (Score:4, Insightful)
-- Henry Spencer<br>
Usenet signature, November 1987
Re:Who wrote the introduction? (Score:2, Insightful)
Indeed, we are seeing that that is not the case. Microsoft has gone out of their way to drastically alter their GUI, such that it looks nothing like the XP GUI, and thus nothing like the older GUI before that. Hardly a show of uniformity, if I do say so myself.
Re:impressive (Score:3, Insightful)
A shell is nice but... (Score:5, Insightful)
This is just the beginning (Score:5, Insightful)
Just a few days ago, there was another article on Slashdot [slashdot.org] 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 [sysun.com] was all the rage... *sigh*
Marketing sucks (Score:3, Insightful)
The best I can say is "It's about damn time".
..C# (Score:5, Insightful)
" 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..
Re:impressive (Score:5, Insightful)
Agreed. In this case it's the coder, who should really have enough nous to print the data in the format in which he intends to use it. That's hardly rocket science, is it?
Of course, if you didn't write the python script and don't have the time and/or skill to hack it, you might nd up using cut and the like to get the data in the format you need. The cool think about that is that it's possible. I don't know if the same can be said under MSH, but it seems unlikely - the focus of Monad seems to be .NET integration, not a stream based filtering command line environment.
Then again, maybe you didn't even write the wrapper script and don't understand anything. If so you can always troll slashdot as an AC and get some astroturfing in.
Re:Who wrote the introduction? (Score:1, Insightful)
*
(Nothing, correct? Just change the look of it IF the new look bothers you... it's always been this way in Microsoft OS' anyhow, thru XP/Server 2003 (which it defaults to anyhow on this version of the OS)).
APK
P.S.=> This SHOULD also be "doable" in Windows 'VISTA' builds as well, but I can't comment on it having used it first-hand (Windows Server 2003 user here, in workstation default install mode)...
As far as this new "MONAD" shell?
It will probably appeal greatly to those who are used to WSH/CSH scripting (using a VB-like model) no doubt!
Personally/myself??
I have always found that the std. cmd.exe command-interpreter shell is pretty powerful in combination with
www.jsiinc.com
By searching the keyword "freeware" there...
There's not alot you cannot accomplish with those toolsets alone imo...
Lastly/Worst comes to worst?
Writing up a console/charactermode/terminal app is NOT a problem with languages like Borland Delphi if needed...
(However, then you need to be more than just a network tech/administrator usually, & have "more serious coding skills" & understanding of the OS + the language tool you use in order to do this - most techs don't have that, & few admin types do)...apk
doing it for? (Score:5, Insightful)
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!
Hypothetical for the Linux Crew (Score:3, Insightful)
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.
Re:I'm surprised none of you have seen it. (Score:5, Insightful)
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.
hummm.... (Score:5, Insightful)
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.
Re:Who wrote the introduction? (Score:5, Insightful)
That is what uniformity is. Changing colors / visual schema is not uniformity. That's like saying a green car is not uniform to a blue car. You can still drive it with the knowlege you learned in drivers ed.
-everphilski-
Re:impressive (Score:2, Insightful)
Perhaps that's interersting from the POV of the programmer, but from the POV of the sys admin, it's a nightmare.
Those that don't understand Unix are bound to reimplement it, badly.
Bash goes out of its ways to provide tools and syntax allowing you to remove all customizations others could have put in the environment. Korn shell compatible shells are lightweight and portable and cross-platform and respect a small standard. Lacking any of this means a shell is NOT like bash (or any other shell). So your premise is wrong for MSH. MSH does not have MOST of these power features of shells, so I don't understand how you can compare it to them.
In linux we're used to program scripts with python
I'm not. Who is this 'we' ?
then pass the data through pipes to bash to do something with it. Crappy.
This says it all. It is one of the most powerful feature of Unix, and you call it 'crappy'.
Again, 'those that don't understand Unix
FYI, I saved several production data in real time in big french firms thanks to this crappy feature
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
Which, obviously here, is the person who has wrote this garbage. I would never write this, but would rather write a sed command to do that.
The cool thing about MSH that its a SUBSTITUTE to bash/cmd.exe, not a "complement" like python is
It sure is cool. csh was cool too. Look at what happened to it. Cool and Useful/Powerful are not the same.
Is not that bash or python are bad
Fortunately you have enough common sense to agree with that.
but bash-like shells are 30-years-old unchanged technology
Proven technology, what is wrong with that ?? FYI, people have tried to add cool things to the concept (csh types, zsh,
A shell must have, among its features, stability and security. 30 years old is a good thing when you want these. Given that MSH is developed by MS, and given their track record on these 2 points (stability, security), excuse me if I don't hold my breath on MSH.
Fortunately, there're people writing user-oriented python-based shells, like http://ipython.scipy.org/ [scipy.org]
User-oriented python-based shells, OMG !!
Given the problems I've got till this day with Python apps (memory leaks, unexplained and untracable crashes), given the tedious work of migrating core systems based on Python (look at Gentoo), excuse me, but I think I will stay with bash for a long time.
Re:On The Pipe (Score:3, Insightful)
If all objects have methods to serialise them to strings - and it doesn't seem unreasonable to assume that they will - then whenever you're fed an object you don't know about, you can access it as a string. At which point, bingo! you can use a general purpose filter for text data, just like in Unix.
I may be wrong, but this does look to me like a technique that can degrade reasonably elegantly to the lowest-Unix-denominator for programs that don't make use of all the
And who is the only one that can implement that? (Score:2, Insightful)
As much as MSH *might* be good for it's other strengths, there's the possibility that it might never have good tab completion, code coloring, and other such things.
That's the REAL reason OSS/Linux/Etc has taken off. The empowerment of being able to change the system to suit your needs, instead of altering your needs to suit the system.
And in the end, people like sh/bash/etc. It's extremely easy for even a beginner to do practical things and produce functional scripts. It almost seems like MSH originally stood for "Microsoft Scripting Host" and the marketing department decided that it would be better to call it a shell to compete with Linux.
Re:An open source clone? (Score:5, Insightful)
Regards,
Steve
Re:Quick! Open Source Monkeys Fly (Score:5, Insightful)
unix does need a shell like monad I'm afraid (hence ac)
What monad will offer is something like
>ls -l | head -n 10 | sort size | excel
They are piping objects, we would need to do a lot of parsing to achief the same effect.
Someone really needs to write a new shell for unix and abstract the unix system, by giving it knowledge of the common unix tools (parsing the output for the user), like ps, ls, sed, etc.
Want to be famous ?
Here is your idea.
Re:Who wrote the introduction? (Score:2, Insightful)
And so can all the malware, spyware, crippleware, middleware, trojans, worms, viruses, and anyone with even a mild desire to make life difficult for people around them. I bet it'll be even easier to hide shadow processes on the system from the unwary user thus increasing Microsoft's ability to sell the world's desktop out to corporate marketing departments. Imagine banner ads, not in your browser, but legally (via click through EULAs) on your desktop. There's nothing you'll be able to do about it.
Registry + ActiveX + a functional shell (finally) +
Windows admins are screwed. Get out of IT now if you're still sane, get out even if you're long past sane. Life will become hell very soon.
Re:An open source clone? (Score:1, Insightful)
Re:Quick! Open Source Monkeys Fly (Score:1, Insightful)
Re:Who wrote the introduction? (Score:2, Insightful)
Re:What a weird MiSHMaSH (Score:4, Insightful)
I really don't understand people like you. You whine, moan and complain because Microsoft's command prompt sucks, and when they fix it, you go out of your way to find new things to bitch about. What is very interesting, is that if they HAD copied Bash, or one of the other unix command lines, you would have immediatly jumped on them for that too.
Re:Quick! Open Source Monkeys Fly (Score:5, Insightful)
Re:hummm.... (Score:3, Insightful)
Syntactic sugar leads to cancer of the semicolon -- Al Perlis.
Re:doing it for? (Score:3, Insightful)
And, you know, if a shell is going to make an assumption at all, I'd prefer it assume it's an expression than a command because if someone aliases ls with rm -fR, better it just echo that back then execute it, right?!?
Re:doing it for? (Score:3, Insightful)
The GP isn't so much complaining about the assumption, but the arbitrariness of it. In most UNIX shells, everything you type at the prompt is a command. In MSH however, it appears that sometimes when you type something in, it might be a command, it might be a value, it might be a.... etc.
Who's to say I don't have a command called '5'? What if it's not in the correct path? Or, for that matter, who's to say I don't have a command called '6' that I typo'd?
Re:The true meaning of "msh" (Score:2, Insightful)
Re:impressive (Score:4, Insightful)
"I'm just not seeing anything in here but a horribly tortured object oriented syntax and a reexpression of MS' nightmarish implementation of the common "--help"."
The object oriented stuff provides extra features. You can still alias all the old stuff to the usual commands, and it apparently does so by default.
"Considering the decades of command line functionality which sh type shells have, apparently MSH is only dreaming of what BASH can do."
Please explain again how you think it's the shell's fault that other applications don't support its features. Oh and btw, `echo 'html-stuff' | firefox` results in a blank browser window.
Re:Quick! Open Source Monkeys Fly (Score:3, Insightful)
Kick in the *NIX fanboi defense reflex: Offer a half-baked parallel and insist that any deficiencies are things you didn't need or shouldn't be doing in the first place.
Re:Who wrote the introduction? (Score:4, Insightful)
This is the first time I've ever seen someone refer to a database as a single point of failure.
Always good to see new things.Re:A shell is nice but... (Score:3, Insightful)
Re:Who wrote the introduction? (Score:4, Insightful)
The only legitimate (and I'm using the term loosely) function that the Registry performs is to make it virtually impossible to move a major application from one machine to another without running the actual installation program. In effect, it's an intrinsic anti-piracy technique. Sometimes I think that's the only reason that it's still there.