cat generates a stream of data from one or more files
It therefore concatenate files.
file 1 - line 1
file 1 - line 2
file 2 - line 1
file 2 - line 2
cat file1.txt file2.txt > fileAll.txt
cat fileAll.txt
file 1 - line 1
file 1 - line 2
file 2 - line 1
file 2 - line 2
Output all files with the pgn extension
cat *.pgn
where: *.pgn is a glob pattern
Concatenate the output of file and of standard input
cat f - g
where:
Example:
echo 'Hello World' | tee f g
Without any argument, cat will copy standard input to standard output
cat
Example:
echo 'Hello World' > helloIn.txt
cat < helloIn.txt > helloOut.txt
cat helloOut.txt
Hello World