Sometimes you need to add line numbers to the text, which you can do with the Unix cat command. The use of the
Cat command is as follows:
name
cat-concatenate, Copy, and print files
synopsis
cat [-BENRSTUV] File ...
Options
Cat recognizes the following options:
-b Omit Line numbers to blank lines when-n option is
& nbsp; specified. If This option is specified, the-n the option is
automatically selected.
-e Print A $ character at the "End of" (prior to the
New-line). If This option is specified, the-v option is
Automatically selected.
-N Display output lines preceded by line numbers, numbered
Sequentially from 1.
-r Replace multiple consecutive empty Lines with one empty
Line, so this there is never more than one empty line
&nb sp; between lines containing characters.
-s Silent option. cat Suppresses Error messages about non-
Existent files, identical input and output, and write
errors. Normally, input and output files cannot have
& nbsp; identical names unless the file is a special File.
-t Print each tab character as ^i and Form feed character as
^l. If This option is specified, the-v the option is
automatically selected.
-U does not buffer output (handle character-by-character).
Normally, output is buffered.
Cat-n can add line numbers, Cat-b can also add line numbers, but empty lines are ignored.
If the following command can add blank lines for File1, enter as File2 (blank line plus line number): Cat-n file1 > File2
If the following command can add blank lines for File1, enter as File2 (no line number for blank lines): Cat-b file1 > File2