Working with text files
Part of the Unix philosophy is, write programs to handle text streams, because that is a universal interface. Communication between programs, configuration files, and many other things is implemented in plain text. This section is all about handling plain text.
Reading text
On the most fundamental level, reading the content of a file in plain text format means taking the content of this file and redirecting it to the standard output. The cat
command is one utility that is able to do that—concatenate the content of one or more files (or another input channel) to the standard output:

Some nice parameters of this utility are:
-A
: Show all non-printable characters-b
: Number lines, including empty lines-n
: Number lines, except empty lines-s
: Suppress repeated (!) empty blank lines
There is another utility similar to cat
; the tac
utilities concatenate the content in reverse order.
The problem with the cat
command is that it just dumps the content to the standard output, without...