全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Filter?

又称: filter (shell)

Definition 8.7 University Computer Science — Year 1 · 第 8 章 — The Shell

A filter is a program that reads standard input, transforms it, and writes standard output, so that it can stand anywhere in a pipeline: sort sorts lines, uniq -c collapses runs of equal adjacent lines and counts them, wc -l counts lines, head and tail keep the first or last lines, cut keeps fields, tr translates characters, paste joins lines.

The pipeline of : six programs running at once, each reading what the one before writes. uniq -c counts only adjacent equal lines, hence the sort before it.
The pipeline of Output 8.4: six programs running at once, each reading what the one before writes. uniq -c counts only adjacent equal lines, hence the sort before it.
在原文中阅读 →