Learn Linux, 101: Text streams and filters | Linux Today

Learn Linux, 101: Text streams and filters

Written By
Web Webster
Web Webster
Sep 1, 2009

[ Thanks to An Anonymous Reader for
this link. ]

“Text filtering
Text filtering is the process of taking an input stream of text and
performing some conversion on the text before sending it to an
output stream. Although either the input or the output can come
from a file, in the Linux and UNIX® environments, filtering is
most often done by constructing a pipeline of commands where the
output from one command is piped or redirected to be used as input
to the next. Pipes and redirection are covered more fully in the
article on streams, pipes, and redirects (which you can find in the
series roadmap), but for now, let’s look at pipes and basic output
redirection using the | and > operators.

“Streams
A stream is nothing more than a sequence of bytes that can be read
or written using library functions that hide the details of an
underlying device from the application. The same program can read
from, or write to a terminal, file, or network socket in a
device-independent way using streams. Modern programming
environments and shells use three standard I/O streams:

“stdin is the standard input stream, which provides input to
commands.

“stdout is the standard output stream, which displays output
from commands.

“stderr is the standard error stream, which displays error
output from commands.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.