cat

cat - concatenate files and print on the standard output or join, files, but you can also use it to display a file on the screen. 
The cat command takes one or more files that you specify, smashes them together, and then sends the resulting file to the standard output device (without changing any of the original files).



The cat command can be used to join multiple files together and print the result on screen.
One dictionary definition of concatenate is "to connect or link in a series or chain"
Lets say we have a file called 01.txt which is a simple text file containing the text "this is the text in file 01", and another file called 02.txt containing the text "this is the text in file 02". If we run cat on file 01 we get the following result.
> cat 01.txt
this is the text in file 01
If we run the cat command on both files, we get this...
> cat 01.txt 02.txt
this is the text in file 01
this is the test in file 02
You can see the cat has printed the contents of both files.
If no file is named, the standard input (usually the keyboard) is printed on screen (also known as 'standard output').

0 comments:

Post a Comment