Small shell tools for text editing
|
Many small programs can help you with your "word tasks" in the shell. Table 1 shows an overview of which ones to use. Unless indicated otherwise, they work with single or multiple files as well as pipe operations. Some applications overlap in their functionality.
To follow along with the examples shown in this article, you can grab the files a.txt , b.txt , c.txt , d.txt , and e.txt from our FTP server [1].
Showing, Piping, and
Merging
The cat and tac tools differ mainly by the output order of the content: cat puts the file in its original order, and tac reverses the order. The scope of their options is also different (see Table 2). You can also add line numbers using cat (Figure 1), including blank lines.
[...]
Buy this article as PDF
Pages: 1
(incl. VAT)