Encyclopedia > Filter program

  Article Content

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 </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.

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



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Ludvika

... Ludvika (http://www.ludvika.se) - Official site Municipalities of Dalarna[?]: Avesta  |  Borlänge  |  Falun  |  Gagnef ...

 
 
 
This page was created in 23.2 ms