"cat"
Written by Pantas Manik on 12:38 PMThis is one of the most flexible Unix commands. We can use to create, view and concatenate files. For our first example we create a three-item English-Spanish dictionary in a file called "dict." 
   % cat >dict
     red rojo
     green verde
     blue azul
   %
   % cat dict
     red rojo
     green verde
     blue azul
   %
If we wish to add text to an existing file we do this: 
   % cat >>dict
     white blanco
     black negro
     
   %
Now suppose that we have another file tmp that looks like this: 
   % cat tmp
     cat gato
     dog perro
   %
Then we can join dict and tmp like this: 
   % cat dict tmp >dict2
We could check the number of lines in the new file like this: 
   % wc -l dict2
8
The command wc counts things --- the number of characters, words, and line in a file.
 
0 comments: Responses to “ "cat" ”