In UNIX and UNIX-like operating systems, a filter is program that gets most of its data from standard input and writes its main results to standard output. UNIX filters are often used as elements of pipelines.
The classic filter would be grep; here's an example:
cut -d : -f 1 </etc/passwd | grep foo
This finds all registered users that have "foo" as part of their username.
Common UNIX filter programs are: cat, cut, grep, head, sort, uniq and tail. Programs like awk and sed can be used to build quite complex filters because they are fully programmable.
UNIX is a portable, multi-tasking and multi-user computer operating system originally developed by a group of AT&T Bell Labs employees including Ken Thompson, Dennis Ritchie and Douglas McIlroy.
By 1993 most of the commercial vendors of UNIX had changed their commercial variants of UNIX to be based upon SVR4, and many BSD features were added on top.
The UNIX trademark and the certification rights were sold to the X/Open Consortium, which was an industry group to define a "UNIX Standard".
In UNIX and UNIX-like operating systems, a filter is program that gets most of its data from standard input (the main input stream) and writes its main results to standard output (the main output stream).
UNIXfilters are often used as elements of pipelines.
The classic filter would be grep, which at it simplest prints to its output any lines containing a character string.