Filter (software)
Encyclopedia
A filter is a computer program to process a data stream
Data stream
In telecommunications and computing, a data stream is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted....

. Some operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s such as Unix
Filter (Unix)
In Unix and Unix-like operating systems, a filter is a program that gets most of its data from its standard input and writes its main results to its standard output . Unix filters are often used as elements of pipelines...

 are rich with filter programs. Even Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 has some simple filters built into its command shell, most of which have significant enhancements relative to the similar filter commands that were available in MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

.

Just as in Unix, such a filter usually gets most of its data from standard input (the main input stream) and writes its main results to standard output (the main output stream). The command syntax for getting data from a device or file other than standard input is the input operator ("<"). Similarly, to send data to a device or file other than standard output is the output operator (">"). To append data lines to an existing output file, one can use the append operator (">>").

The similarity with Unix extends to filters used as elements of pipelines
Pipeline (software)
In software engineering, a pipeline consists of a chain of processing elements , arranged so that the output of each element is the input of the next. Usually some amount of buffering is provided between consecutive elements...

. The pipe operator ("|") on a command line signifies that the main output of the command to the left is passed as main input to the command on the right. From the early days of DOS based computers, the two classic filters are find
Find
In Unix-like and some other operating systems, find is a command-line utility that searches through one or more directory trees of a file system, locates files based on some user-specified criteria and applies a user-specified action on each matched file...

 and sort.

Examples:
  • find "keyword" < inputfilename > outputfilename
  • sort "keyword" < inputfilename > outputfilename
  • find /v "keyword" < inputfilename | sort > outputfilename


Such filters may be used in batch files (*.bat, *.cmd etc.).

For use in the same command shell environment, there are many more filters available than those built into Windows. Some of these are freeware
Freeware
Freeware is computer software that is available for use at no cost or for an optional fee, but usually with one or more restricted usage rights. Freeware is in contrast to commercial software, which is typically sold for profit, but might be distributed for a business or commercial purpose in the...

, some shareware
Shareware
The term shareware is a proprietary software that is provided to users without payment on a trial basis and is often limited by any combination of functionality, availability, or convenience. Shareware is often offered as a download from an Internet website or as a compact disc included with a...

 and some are commercial programs. A number of these mimic the function and features of the filters in Unix. Some filtering programs have a graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

 (GUI) to enable users to design a customized filter to suit their special data processing
Data processing
Computer data processing is any process that a computer program does to enter data and summarise, analyse or otherwise convert data into usable information. The process may be automated and run on a computer. It involves recording, analysing, sorting, summarising, calculating, disseminating and...

 and/or data mining
Data mining
Data mining , a relatively young and interdisciplinary field of computer science is the process of discovering new patterns from large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics and database systems...

 requirements.

Autofiltering data in spreadsheets

In Excel
Microsoft Excel
Microsoft Excel is a proprietary commercial spreadsheet application written and distributed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications...

 or in OpenOffice Calc, AutoFilter filters out unwanted data in a data list.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK