|
Displays one or more files. Can also be used to concatenate files. Format: cat filenames Examples: cat file1 file2 cat cat file1 file2 > file3 cat > file_out Example 2: If you type cat without a filename, cat waits for you to type text using the keyboard. When you type some text and press <Enter>, the text you typed is displayed. Example 3: You can use cat to combine several files into one file. Files are stored one by one, according to the order that they are named in the cat command. Example 4: You can create a file containing text you enter. After you enter the command, cat will wait for you to enter text and will store the text you enter in file_out. When you have finished typing the text, press <Ctrl-d>. |
|