(mostly from "The Art of Unix Programming", Eric S. Raymond)
- Filter
- maybe most fundamental Unix pattern
- reads on
stdin
, emits to stdout
- examples: tail(1), grep(1), tr(1)
- beware of UUOCA
- Source
- no input, outputs on
stdout
- examples: ls(1), ps(1), uname(1), w(1)
- Sink
- consumes from
stdin
, but doesn't output
- examples: lpr(1), mail(1),
- Cantrip
- no input, no output
- just "does" something
- examples: clear(1), touch(1)
- Compiler
- no
stdin
no stdout
- takes one or two file args
- convert file 1 one and writes to file 2
- examples: gcc(1), convert(1), gpg(1), gzip(1)