Command+line+interface

=Command Line Interface=

Introduction
The command line interface is an advanced method of interacting with an electronic device, generally requiring a keyboard for input, the device, or a connection to the device (in the case of a virtual interface) and a monitor for output. Command line interfaces can be used for a variety of operations, and gained the most popular notoriety with the MS-DOS operating system. This is far from their only use however: command line interface is still massively popular with techies, administrators, and in several specific functions and applications. They are often seen in opposition to GUIs, though current interfaces often keep them hand in hand.

History
Command line interfaces in popular computing often take the name of 'terminal'. This is the case in both mac and Unix systems, and includes the terminal client present in windows (used for text based dialing and serial transmission), which can be found under start>programs>accessories>terminal. This is a throwback to the command line's use in initial teletype machine systems (TTY). It seems fitting that the history of command lines is intertwined with the history of this important device. Teletype systems built on the telegraph network of the early 1900's, using digital asynchronous encoding to transmit data (words) from one location to another (Source: [|RTTY]). This could be done simply through a set of wires connected over the distance from one unit to another. Teletype machines were used in the stock market to transmit stock prices, and within businesses also. A business could set up an internal network of these machines, sending documents from one location to another. When the first computers were introduced, they built on the protocol developed by the teletype machine, TTY. The first computers had very few if any input and output devices. The first commercially successful personal computer to sport a microprocessor was the Altair 8800, and it had only front panel lights as output, under which switches stood as input (Freedman). Functional computers in use by the industry and in educational settings used punchcards and printers for output, and cost hundreds of thousands of dollars. We must understand that even then the idea would be to input a single program and then execute it, using switches and punchcards instead of typed commands. The switch to command line interfaces was a logical progression as input technologies changed and evolved. Flexowriters, a machines that looked like a typewriter and outputted directly to computer or via punchcard, were first used in the mid to late 1950s, found in such models as the LGP-30 vacuum tube computer of 1956 (Ceruzzi 42). The first use of the teletype machine was in the PDP-8 minicomputer from DEC; this used an ASR-33 Teletype machine, which introduced ASCII encoding (which is what we use today) and faster input than flexotypes (6-8 characters per second, about 60 wpm) (Ceruzzi 132-133). There is an important idea to understand in order to see why these machines were so well suited for computers at the time. Teletype machines were used generally to send and receive data over telegraph lines, which were essentially just wires. Connect those wires to a computer, and they could be interpreted just as easily. As an interesting side-note, the data encoding method used by teletype machines (commonly called TTY) survived as the standard communication medium for microchip to microchip communications in computers and literally hundreds of thousands of integrated circuits currently manufactured. Also, when we say minicomputers, we refer to the smallest computer available of the time, created using transistors and integrated circuits. The PDP-8 unit sold for about $18,000 dollars at launch and weighed 250 lbs, an incredibly cheap price and weight for the time. CRT screens were brought in around the same era as the PDP-8, and the idea of entering commands in a visual manner and getting a quick response caught on quickly, though initially more in the hobbyist fields than in business situations. Before the 1970s storage had come along from punchcards to drums and finally magnetic storage and actual command line interpreters (the core of a command line interface) became plausible. In 1969 development began on what would become the UNIX operating system, the first massively popular command line interface based system.

CLI as an Interface
There is some great controversy over using the CLI as an interface. Many associate the command line interface as a step backwards from current designs, because of several misconceptions. Most contemporary users have seen an evolution of interfaces to becoming intuitive and easy to use. In contrast, CLIs are viewed as more complex to use. The most many users have seen of CLIs is DOS, an operating system designed when systems could do much less as a whole, and perhaps lacking in features itself, when compared with others of the time like unix shells. This leads to the fallacious conclusion based on a small number of old implementations that CLIs are restricted by their own format to being overly complex while not actually allowing much functionality. This bias can be seen readily in the wikipedia articles on the [|CLI] and [|GUI], where many authors have written back and forth about the respective benefits of the two as an interface. Arguements have been made that comparisons are often contrived and based only on specific implementations of the interfaces, with GUI talk only focusing on WIMPs (Windows, Icons, Menus and Pointer) like windows and minimizing actual CLI use. In efforts of remaining bipartisan, this article will not attempt to directly judge GUIs in relation to CLIs, though it will use several examples from the Windows Operating System to exemplify some of CLIs benefits.

Benefits and Drawbacks
The CLI has four major benefits: precision, low visual and internal overhead, dynamic command context and batch processing. The first and second of these can be found in a case study in //Designing Interactive Systems//. In it, they mention the that when updating a CAD system from CLI to GUI engineers were worried because they enjoyed the CLI as "extremely efficient", allowing "a very large portion of the screen for the engineering drawing itself" (263). Because CLIs allow instructions to be typed and reviewed visually, they tend to do exactly what the creator wanted, or if they don't, they can be quickly reviewed and modified. Visually, command line interfaces need only take up a single text line somewhere within an overall application, allowing more room for whatever the application does. In this way, the windows 'run' command, found in the start menu, is a command line interface (or more accurately a pipeline to the command interpreter). Internally too, command lines need very little to take input, and need not necessarily even be the source of output, as in the CAD system above. It tends to be easy to get a command line functioning, allowing more time to be spent on functions used within the command line. As far as the commands themselves, there is a great ability to create context-nonspecific commands. For example, a command in dos modifying a file could be executed at any time using full paths. Copying a file in a known directory could be accomplished at any time in any instance by typing "xcopy drive:\directory\file newdrive:\newdirectory\". The last benefit of CLIs is batch functionality, a function described lightly via batch (.bat) files and brought back to the Windows Operating System in spades with Windows Powershell. It has been available for years via shell scripting in *nix systems. It is not limited to operating systems: IRC scripting and most programming languages console functionality allow large volumes of commands to be executed in sequence. Say, for instance, a directory contains 100 files named 1.jpg to 100.jpg. You could type "rename 1.jpg my trip - photo 1.jpg" into a dos box 100 times, or type the similar mv command in unix distributions. It is possible to do it automatically in 1 command. Typing FOR /L %i in (1,1,100) do rename "%i.jpg" "trip - photo %i.jpg" into the dos prompt will do exactly what is required (Been a while since I had to remember *that* - Phil).

The major drawback to CLIs is their use of complex commands, which tends to alienate initial users. While command lines tend to endear themselves to people who have taken the time to learn them, the high learning curve usually inherent in them often acts as a barrier to new users. This is perhaps the greatest drawback to CLIs, as it seems most ingrained in the format itself - in order to provide greater functionality, greater complexity in commands is going to be required. There are usually no visuals on which a new user can depend, and this often exacerbates the issue.

The Future of the CLI
The immediate future of the CLI seems destined to continue the trends currently seen in computer culture. CLIs have been used for years in the opensource community where their features can be best harnessed while weaknesses are mitigated. We are seeing and will continue to see further extension of CLIs within the most popular commercial Operating Systems (i.e. windows), allowing all the functionality of the visual interface but with added features for those who wish to learn and use them. Windows Vista, Microsoft's new operating system for 2007, is including an application called Windows [|Powershell], which has all the functionality of the cmd that preceded it, but takes many cues from current *nix shell offerings. This could be the best of both worlds for computer users: new users can stick to the simpler and more user friendly visual interface, while power users can optimize their experience with powerful shell scripting. If a user wants to expand their experience, they can be free to learn as much of this complex system as they choose at their own leisure.

Contemporary Usage
> > >
 * FTP
 * *nix shells (Bourne, bash, etc.)
 * SSH
 * Telnet
 * DOS (Disk Operating System, present in Windows up to WinME)
 * QDOS (Quick and Dirty Operating System)
 * IRC
 * WIN9x command interpreter (command.com: dos 7.1)
 * WINNT+ Command (cmd)
 * Windows Powershell (Vista)