Text manipulation is the process of modifying the text to suit our needs.
There are many formatting features that can be done to a document. They
include but not limited to, changing the word of every character of a word
to uppercase, maybe there is a misspelled word in a document, and we want
to change every instance of the misspelled word in the whole document.
When we manually edit the text in a document, it can be very tiresome;
moreover, we cannot eliminate the possibilities of human error. Thus it is
very vital to find a way to find a command that can be used to modify
words in a text file of any size in a document with ease. The Linux
command line comes in hand, as it allows someone to type a single
command line and edit the whole document in less than a document.
Each and every command found in the Linux operating system can perform
only one job, except that it will only do that one job and no other. The
Linux command-line tools can be linked together like bricks the way we
want and use the command lines to our advantage.
How Linux is Useful in Text Manipulation
The process of connecting the command lines is known as piping. The
symbol for a pipe is I (always remember it is not a lower-case L or any
other character, but only I) .
Another feature that Linux offers is the use of the right-angle bracket >. By
default, the Linux operating system displays commands on the screen when
we input the command in the terminal. However, when we want to create
files, we need to redirect the output of the command using the > then
followed by the name of the file. Please note if the file is written already
existed, it will be overwritten; hence, it becomes important to append the
file if you don’t want it to be overwritten. In order to append a file, you
need to use the >> to APPEND (added) to the file. In instances when you
append a file, the results will be saved at the end of the existing file. Note
only existing files can be appended.