Jump to content

List of command-line interpreters: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Jhyrman (talk | contribs)
mNo edit summary
Line 5: Line 5:
[[Image:bash screenshot.png|thumb|180px|right|Sample screenshot of the command-line interpreter [[Bash (Unix shell)|Bash]].]]
[[Image:bash screenshot.png|thumb|180px|right|Sample screenshot of the command-line interpreter [[Bash (Unix shell)|Bash]].]]
{{FixBunching|end}}
{{FixBunching|end}}
A '''command-line interpreter''' (also called as'''command line [[Shell (computing)|shell]]''', '''command language interpreter''') is a [[computer program]] that reads lines of text entered by a user and interprets them in the context of a given [[operating system]] or [[programming language]].
A '''command-line interpreter''' (also called a '''command line [[Shell (computing)|shell]]''', '''command language interpreter''', or abbreviated as '''CLI''') is a [[computer program]] that reads lines of text entered by a user and interprets them in the context of a given [[operating system]] or [[programming language]].


==Command-line interpreters as user interfaces==
==Command-line interpreters as user interfaces==

Revision as of 14:28, 8 August 2010

Template:FixBunching

File:UKNCRT-11.png
RT-11 running on UKNC

Template:FixBunching

Sample screenshot of the command-line interpreter Bash.

Template:FixBunching A command-line interpreter (also called a command line shell, command language interpreter, or abbreviated as CLI) is a computer program that reads lines of text entered by a user and interprets them in the context of a given operating system or programming language.

Command-line interpreters as user interfaces

Command-line interpreters allow users to issue various commands in a very efficient (and often terse) way. This requires the user to know the names of the commands and their parameters, and the syntax of the language that is interpreted. From the 1960s onwards, user interaction with computers was primarily by means of command-line interfaces.

Early history

From the 1960s onwards, user interaction with computers was primarily by means of command-line interfaces, initially on machines like the ASR-33 Teletype, but then on early CRT-based computer terminals such as the VT52.

All of these devices were purely text based, with no ability to display graphic or pictures[1]. For business application programs, text-based menus were used, but for more general interaction the command line was the interface.

From the early 1970s the Unix operating system on minicomputers pioneered the concept of a powerful command-line environment, which Unix called the "shell", with the ability to "pipe" the output of one command in as input to another, and to save and re-run strings of commands as "shell scripts" which acted like custom commands.

Microcomputers

The command-line was also the main interface for the early home computers such as the Commodore PET, Apple II and BBC Micro - almost always in the form of a BASIC interpreter. When more powerful business orientated microcomputers arrived with CP/M and later MSDOS computers such as the IBM PC, the command-line began to borrow some of the syntax and features of the Unix shells such as globbing and piping of output.

Graphic User Interfaces

The command-line was first seriously challenged by the new GUI approach in 1984 with the Apple Macintosh 128K, but it took until 1990 and Windows 3.0 before most users converted.

Command lines today

While most computer users now use a GUI almost exclusively, more advanced users now have access to increasinlgy powerful command-line environments:

  • MS Windows users have the classic cmd.exe "DOS"-like environment, but also the new PowerShell interfaces
  • Apple and Linux users have the classic Unix bash shell
  • Routers from Cisco and many others are commonly configured from the command-line

Scripting

Most command-line interpreters support scripting, to various extents. (They are, after all, interpreters of an interpreted programming language, albeit that in many cases the language is unique to the particular command-line interpreter.) They will interpret scripts (variously termed shell scripts or batch files) written in the language that they interpret. Some command-line interpreters also incorporate the interpreter engines of other languages, such as REXX, in addition to their own, allowing the executing of scripts, in those languages, directly within the command-line interpreter itself.

Conversely, scripting programming languages, in particular those with an eval function (such as REXX, Perl, Python, Ruby or Jython), can be used to implement command-line interpreters. For a few operating systems, most notably DOS, such a command interpreter provides a more flexible command line interface than the one supplied. In other cases, such a command interpreter can present a highly customised user interface employing the user interface and input/output facilities of the language.

Quotes

Although most users think of the shell as an interactive command interpreter, it is really a programming language in which each statement runs a command. Because it must satisfy both the interactive and programming aspects of command execution, it is a strange language, shaped as much by history as by design.

Examples

See also

References

  1. ^ With the exception of ASCII art
  2. ^ Brian W. Kernighan and Rob Pike, "The UNIX Programming Environment", Prentice-Hall (1984).