Filter (data-processing)

See also: Filter

In data processing, a filter is a program able to treat a flow of Donnée S.

The filters receive usually their data since the entered standard ( stdin ) and write the result (i.e. treated data) on the left standard ( stdout ). The syntax of the order making it possible to obtain the data since a peripheral or of a file rather than of the standard entry is the operator of redirection of the flow of entry < . Conversely, to send the data treated towards a peripheral or a file rather than towards the standard exit, the operator of redirection of exit > is available. To add data in a rather existing file than to replace that which it contains already, it is possible to use the operator > > .

The operator | of the line of order means as for him that the exit of the ordering of left placed at the entry of the order of right-hand side. He makes it possible to connect several filters, in order to cumulate the treatments of them. Such sequences are called pipelines.

Some operating systems, like UNIX, include/understand many filters. Microsoft Windows also has simple filters, integrated into its interpreter of orders, whose majority are significant improvements of the equivalent orders which were available on MS-DOS.

Certain filters have a graphic user interface so that the user can easily develop the treatments which they need, in particular for the Exploration of data.

  • Examples on Ms-Windows:

find " motclé" < fichierentrée > fichiersortie leaves < fichierentrée > fichiersortie find /v < fichierentrée | > fichiersortie leaves

Such filters can used in the .cmd or command files .bat). These examples are also usable on UNIX systems.

  • Example on UNIX:

The following example uses the skeletal filter sed. The entry is the Character string “Hello World”. The treatment consists in replacing “World” by “Wikipédia”.

echo " Hello World" | sed “s/World/Wikipédia/”

This order produces the chain “Hello Wikipédia”.

See too

Related articles

Examples of filters

Random links:Raion de Glodeni | Rene Saorgin | Caroline Reynolds | Serge Tchakhotine | Ljutovnica | Anderlues