MSH (shell)

MSH, or Microsoft Command Shell, is a command line interface and scripting language being developed by Microsoft. It is similar in usage to the Unix shells, but is based on object-oriented programming and the .NET framework.

Beta1 of MSH has been publically released. See links for download instructions.

Contents

History

Microsoft´s second operating system (its first was Xenix) was the text-based MS-DOS, which included a simple interface called command.com. Although certain features of this - and its successor under Windows NT, cmd.exe - were based on those of Unix shells; the latter of which being far more powerful. Indeed, as Windows was developed, more effort was put into providing graphical access to DOS features than vice versa, making many features of the OS awkward to interact with at the text-based level. This in turn led to some tasks being difficult to automate, as there was no scripting language immediately available to the user to automate everyday tasks.

This contrasted with the traditional Unix approach, based on the philosophy of pipes and filters, where many tools are designed to have inputs and outputs as text, which can be fed from one to another via pipes. Because of this approach, many graphical applications in Unix are only interfaces for command line tools.

Central concepts

The system's codename, Monad, comes from Gottfried Leibniz's Monadology, a philosophy which says that everything is a composition of fundamental elements called 'Monads', which are all integrated together in 'pre-established harmony'. Similarly, the focus of MSH is on composition of complex tasks from a series of components. In this case, the components are special programs called commandlets (or cmdlets), which are .NET classes designed to use the features of the environment. The key difference between the usual Unix approach and the MSH one is that rather than creating a "pipeline" based on textual input and output, MSH passes data between the various commandlets as arbitrary objects. Unix does not preclude the use of arbitrary streams of data being passed between command line utilities, but textual input and output is the primary and most popular model. Microsoft is writing the shell to be entirely object-oriented from the start.

If accessed individually from the command-line, a commandlet's output will automatically be converted into text, but if its output is to be used by another commandlet, it will be converted into whatever form of object is most appropriate for that commandlet's input. This has the advantage of eliminating the need for the many text-processing utilities which are common in Unix pipelines, such as grep and awk, as well as allowing things to be combined interactively, or in a scripting environment, which would otherwise require a more complex programming language. For instance, a listing of processes will consist not of text describing them, but objects representing them, so that methods can be called on those objects without explicit reference to any outside structure or library.

MSH was part of an overall strategy within Longhorn to treat all parts of the OS as .NET objects, and thus allow the user greater flexibility over how they are used. This is aimed to make previously complex interactions manageable within the bounds of frameworks such as MSH; for example, the windows registry can be exported as though it were a filesystem, and navigated by treating it as a hierarchy of files and directories.

Features

Although still in development, a number of key features of MSH have already been revealed, including:

  • commandlets all inherit certain options, allowing the user to choose things such as the level of interaction and how to deal with errors - including a "suspend" feature, which allows the user to enter a new command shell, investigate a problem, and then continue with the original command. A simple mechanism is built-in for the programmer to define the prompts to be shown in such circumstances.
  • options are generally whole words, but can be specified to the minimum number of letters necessary (e.g. the option -show-detailed-information could be entered as -s if no other option began with 's')
  • tab completion
  • the ability to assign the output of a command to a variable, which will then be an object or array of objects inspectable in any way desired. For example you can output a command result directly to Excel.

External links

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools