# CLI

## Command linre interface.

The command line interface is fastest to make operational procedures.

Much resources can be accessed without spend time.

The most users of tecnology preffers this interface to make some actions.

The interface CLI is the most used interface but this runs easy in any type of device.

Since on small microcontrolled device, to a most powerful environment.

The **command line interface** need a command interpreter.

Most of then give a way to produce automated tasks, this using small scripts.

Also you can use logical procedures, like programming languages.

> This sample shows one small line used in "bash" to produce a "loop".


"for i in atual antigo; do echo texto $i;  echo texto $i | sed s/$i/novo/;done"

In one UNIX like system, the command line interface have much resources and integration with "user"/operator.

One useful resource is "gpm", this softwares control copy/paste and other mouse functions on a simple terminal.


The structure of a terminal can be some like:

	(tty/device) -> login/session controller.

	(command interpreter) <- - -> "user"/operator.

> The tty device is the virtual/phisical controller, this folow a single serial input/output device.

This device use various phisical resources.

The serial terminal create one default input device(STDIN) and one default output device(STDOUT).

Normaly the stdin points to keyboard, and stdout points to screen.


1985 convert imagem.jpeg -gravity North -pointsize 30 -annotate +0+100 'Academia do software livre' imagem1.jpeg 1996 history | grep convert 1998 echo $(history | grep convert) 1999 echo $(history | grep convert) >> cli-exemplos.txt

redirects:

ls -l /proc/self/fd/    2> /dev/null 3>&2

refirecionando o descritor de media e depois clonando o mesmo.

"1"  --> redirecionado para "2" porteriormente "buferizado" e clonado através  de um terceiro. "3>2"

