concatenating files
Hello all,
I am trying to join two text files together as a part of a shell script by using: cat $file1 $file2 > output My problem is that although this command works ok, but it also displays both file's contents to the shell output. Have you go any ideas how to avoid this output to the shell? (cat -u did not work) Cheers Spiros |
cat $file1 $file2 &> output
|
I don't get any output on the screen when I use your command s_siouris.
But the file is created just fine. |
sorry guys, my mistake: I was also using the "detex" command to strip all latex commands (I am writing a shell script to act as a word count), and this was causing the output to stdout and not the cat command...
Cheers Spiros |
I haven't had the output of cat echo'ed on the screen then redirecting the output to a file.
doing "cat $file1 $file2 &> output" may place both streams in the file corrupting the output. Do your files contain odd characters such as the redirection characters. If so, place the input filenames in double quotes. You might want to look in the other parts of the script for a reason. Such as a 1&>2 somewhere earlier. |
All times are GMT -5. The time now is 10:13 PM. |