Le cmd

Disponible uniquement sur Etudier
  • Pages : 2 (279 mots )
  • Téléchargement(s) : 0
  • Publié le : 11 octobre 2010
Lire le document complet
Aperçu du document
Unlike COMMAND.COM, which is a DOS program, cmd.exe is a native program for the platform. This allows it to take advantage of features available to native programs on theplatform that are otherwise unavailable to DOS programs. For example, since cmd.exe is a native text-mode application on OS/2, it can use real pipes in command pipelines,allowing both sides of the pipeline to run concurrently. As a result, it is possible to redirect the standard error in cmd.exe, unlike COMMAND.COM. (COMMAND.COM uses temporaryfiles, and runs the two sides serially, one after the other.)

In reality, cmd.exe is a Windows program that acts as a DOS-like command line interpreter. It is generallycompatible, but provides extensions which address the limitations of COMMAND.COM:

SETLOCAL/ENDLOCAL commands limit the scope of changes to the environment
internal CALL andGOTO labels lessen the need for individual batch files to perform parts of a task.
filename-parsing extensions to the SET command are comparable to C shell.
anexpression-evaluation extensions is also provided in the SET command.
an expansion of the FOR command to support parsing files and arbitrary sets in addition to filenames.
use ofarrow keys to scroll through command history (provided by DOSKey in COMMAND.COM)
off-by-default path completion capabilities similar to bash tab completion
a directorystack accessible with the PUSHD and POPD commands
IF can perform case-insensitive comparisons and numeric equality and inequality comparisons in addition to case-sensitivestring comparisons
the ability to escape reserved characters by using the caret character (^)
The extensions can be disabled, providing a stricter compatibility mode.