You can chain as many commands together as you like. Say you have an inexplicable desire to replace every G with Q. For this you use the command tr G Q, like this:
tac /usr/doc/copyright/GPL | tr G Q | less
You could get the same effect using temporary files and redirection, for example:
tac /usr/doc/copyright/GPL > tmpfile
tr G Q < tmpfile > tmpfile2
less < tmpfile2
rm tmpfile tmpfile2
Clearly a pipeline is more convenient.
6.6 Filename Expansion
Often you want a command to work with a group of files. Wildcards are used to create a filename expansion pattern: a series of characters and wildcards that expands to a list of filenames. For example, the pattern /etc/* expands to a list of all[[2]] the files in /etc.
[2] Actually, files beginning with . are not included in the expansion of *.
* is a wildcard that can stand for any series of characters, so the pattern /etc/* will expand to a list of all the filenames beginning with /etc/.
This filename list is most useful as a set of arguments for a command. For example, the /etc directory contains a series of subdirectories called rc0.d, rc1.d, etc. Normally to view the contents of these, you would type the following: