The "cat" command is mostly used for viewing files but not many people know that the original purpose of this command is for merging files together ("cat" is the abbreviation of "catenate", which means " to connect things together").
The syntax to use "cat" to merge multiple files is very simple. Suppose you have a sample file1 like this:
And a sample file2 like this:
And a sample file3 like this:
To merge the three sample files above into a new file4, the command you can use will be:
cat file1 file2 file3 > file4
After that, you will have the file4 like this:
11111 11111 22222 22222 33333 33333