Filter program
A
filter program is classically a
UNIX program that is designed to be used as part of a
pipeline of two or more UNIX utilities. Generally a filter program will read its
standard input and write to its
standard output and do little else. Conventionally a filter program distinguishes itself by being fairly simple and performing essentially one operation, usually some sort of simple transformation of its input data.
The classic filter would be grep; here's an example:
cut -d : -f 1
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.
A more complete list of UNIX filter programs:
- awk
- cat
- comm
- cut
- expand
- compress
- fold
- grep
- head
- nl
- pr
- sed
- sh
- sort
- split
- strings
- tail
- tee
- tr
- uniq
- wc