Command interpreter

format_list_bulleted Contenido keyboard_arrow_down
ImprimirCitar

A command interpreter or command interpreter is a computer program that has the ability to translate the orders entered by users, through a set of instructions provided by itself. directly to the kernel and the set of tools that make up the operating system. The commands are entered following the syntax incorporated by said interpreter, within the environment provided by the terminal emulator, through an inductor that waits for the commands to be entered or instructions PROMPT>commandname argument/s /path/to/the/the/files

When entering the command with the 'Enter' key, the interpreter analyzes the sequence of characters entered and, if the syntax of the command is correct, executes it, resorting to the functions offered by the operating system or the program it represents, whether it is a bank data manager, an FTP session, ssh, etc. The response to the user is rendered on the monitor or in the background. It works interactively, that is, user and machine communicate successively.

They incorporate features such as process control, input/output redirection, file listing and reading, protection, communications, and a command language for writing batch programs or (scripts or scripts). One of the best known shells is the Bourne Shell, which was the shell used in early versions of Unix and became a de facto standard.



Command line interface

Evolution of user intefaces.
CLI (Command line interface(c): Command line interface
GUI (Graphical user interface): Graphical user interface
NUI (Natural user interface): Natural user interface
A typical CLI found in the graphical interfaces of various operating systems, to run applications through a command interpreter.

The command line interface or command line interface (in English, command-line interface, CLI) is a type of computer user interface that allows users to give instructions to some computer program or operating system by means of a single line of text. It should be noted that the concepts of CLI, shell and terminal emulator are not the same since CLI refers to the paradigm, while a shell or a terminal emulator are specific computer programs, which usually together implement the CLI. However, the three are often used synonymously.

CLIs can be used interactively, by writing instructions to some sort of text input, or they can be used in a much more automated way (batch file), by reading commands from a scripts file.

This interface has been around almost since the dawn of computing, surpassed in antiquity only by punch cards and similar mechanisms. They exist for different programs and operating systems, for different hardware, and with different functionality.

For example, CLIs are a fundamental part of shells or terminal emulators. They appear in all desktop interfaces (GNOME, KDE, Microsoft Windows) as a method of running applications quickly. They appear as interfaces to interpreted languages such as Java, Python, Ruby, or Perl. They are also used in client-server applications, in database managers, in FTP clients, etc. CLIs are a fundamental element of such major engineering applications as MATLAB and AutoCAD.

CLI's counterpart is the graphical user interface (GUI) which offers improved aesthetics and greater simplification, at the cost of greater consumption of computational resources, and generally reduced achievable functionality. Likewise, the problem of greater vulnerability appears given its complexity.

CLIs are used by many programmers and system administrators as their primary work tool, especially on Unix-based operating systems; in scientific and engineering settings, and a smaller subset of power home users.

On handheld devices and PDAs, CLIs are not used, due to the complexity of entering text data, or the absence of keyboards at all.

History

In the early days of computers, and during the era of computers called mainframes, control of program execution was done from special places (usually located near the computer in rooms with air conditioning), where the administrator directly manipulated the machine.

Teletype

The order was typed on the keyboard and the response printed on paper was received. These teletype-based systems gave rise to the first efficient way to interact with computers: lines of simple text.

With the advent of the Unix operating system in the early 1970s, the use of the command line became standard. Pipeline-based execution rules, file filtering using wildcards, and all those features that the nascent text interfaces allowed were canonized. The operating systems that would come (CP/M, DOS) would adopt those qualities as their own.

With the popularization of the personal computer in the 1980s, applications entered a new scenario where system resources no longer had to be shared with other users. Now each user had their own machine, with which they interacted in a much more personalized way. Apple and then Microsoft successfully launched systems that exploited all the visual concepts that had been developed by Alan Kay and his team at PARC, that is, a graphical interface to control the computer by means of a mouse.

To this day the GUIs remain the dominant interface and the CLIs the secondary interface. However, Dr. Alan Kay himself has pointed out that "it is necessary to develop a new type of interface" to optimize the relationship between humans and computers.

Operation

Scheme of elements involved in a line of orders.

In its simplest form, a CLI consists of a space where you can type commands (usually signaled by a prompt). The user types a command and executes it by moving to the next line, using the Enter key.

Commands given to the CLI are often of the form:

PROMPT>application [params] files or URI...

On completion and sending the command with the Enter key, a command interpreter module parses the received string of characters and, if the command syntax is correct, executes the command within the context of the program or operating system where it was executed. finds. This way of working is sequential, and is equivalent to a type of step-by-step programming.

The user perceives the processing of his instructions in the form of an action. If this processing information is sent to the user in plain text, then it is called stdout. The user can also receive a textual error report in a specialized channel called "stderr". Almost all shells implement the display of "stdout" and "stderr" to the same device, in most cases the screen.

It is also possible to use scripts, that is, files with instructions saved as if they were being written at the moment. In case of error, the execution of the script can be aborted. In this way, the command line can be used without even having to deal with the prompt, nor being present in front of the monitor or keyboard.

Implementations

Almost any program can be designed to offer the user some kind of command interpreter. For example, some first-person PC games have a built-in shell, commonly known as a "console" (not to be confused with Game Console), used for diagnostics and administrative tasks. Quake, Unreal Tournament, Ragnarok Online or Battlefield are some examples. Sometimes the console is the only means of repairing problems.

A program that interacts with the kernel of an operating system is often called a shell. Some examples are the various Unix shells (ksh, csh, tcsh, Bourne Shell, etc.), the historical CP/M, and the DOS command.com, the latter two being heavily based on the RSTS CLI and RSX-11, DEC PDP-11 operating systems. The Windows Vista operating system promised a CLI called Windows PowerShell, which combined features of traditional Unix shells with its.NET object-oriented framework. This development was not integrated into the operating system by default, especially due to its initial security risks.

Implementations of interpreted languages often also offer a CLI-based framework. In these environments, an instance of the virtual machine is created with which the user can interact.

Some applications provide both a CLI and a GUI. An example is the CAD program AutoCAD. The scientific/engineering numerical computing package Matlab does not provide a GUI for some calculations, but the CLI can perform any calculation. The Rhinoceros 3D three-dimensional modeling program (which is used to design the cases of most mobile phones, as well as thousands of other industrial products) provides a CLI (whose language, by the way, is different from the scripts language). of Rhino). In some computing environments, such as the Smalltalk or Oberon user interface, most of the text that appears on the screen can be used to issue commands.

Invocation standard

There is no mandatory regulation regarding the invocation format (write and execution) or the documentation that the applications or functions must present. However, informal standards have been coined when defining forms. The most important is the use of brackets [ ] to indicate optional parameters. These can be nested ([..[..]]). For example, the documentation for the POSIX cal application says that the way to run it via the CLI is:

cal [[mes] año ]

This means that if you want to see the year 2012, you would have to write it literally:

cal 2012

Examples of interaction

The instruction to list files, in various environments:

Program or operating system Order Programme type
Bourne ls Shell Unix
CMD dir Shell of Windows
NewShell list or dir Beloved (shell of Friends/MorphOS/AROS)
Matlab dir Matricial processing
Quake/dir Video game for PC
TACL FILEINFO Shell of Guardian
Python Shell os.listdir('.') Python, high-level language

Text user interface

A textual user interface consists of a graphical interface made entirely of text. It is not the same as a CLI, although both use the same peripheral.


Contenido relacionado

RPM Package Manager

RPM Package Manager is a package management tool intended for GNU/Linux. It is able to install, update, uninstall, verify and request programs. RPM is the...

Router

A router, router or router > is a device that allows interconnecting networks with different prefixes in their IP address. Its function is to establish the...

MacOS

macOS is a series of graphical operating systems developed and marketed by Apple since 2001. It is the primary operating system for Apple's family of Mac...
Más resultados...
Tamaño del texto:
undoredo
format_boldformat_italicformat_underlinedstrikethrough_ssuperscriptsubscriptlink
save