Cat Name
Cat name1 name2 output name1,name2 files to the screen (first 1 after 2)
Cat >name Create name file: Content in standard input (CTRL + C or ctrl+d exit) (overwrites the original file)
Cat name >name2 Copy the name content to create name2
Cat >>name added after the name file: content in standard input (CTRL + C or ctrl+d exit)
Cat name1 name2 >>name3 connect name1,name2 content and add after Name3
The optional parameters are now:
-N or –number the number of rows for all outputs starting from 1
-B or –number-nonblank and-n similar, except for blank lines not numbered
-S or –squeeze-blank when you encounter a blank line that has more than two consecutive lines, replace the blank line with one line
-V or –show-nonprinting
eg. Cat-n name >name2 Copy the name content to create name2
Cat-b name1 name2 >>name3
Cat/dev/null >name to empty the name file
Cat <<eof >>name added after the name file: content in standard input (CTRL + C or Ctrl+d or EOF exit)
Some uses of cat