Simple question. I'm trying to append one file to another. I've tried this:

cp temp1 >> temp2 temp3

But, it doesn't seem to work.


closed as unclear what you're asking by l0b0, Anthon, GAD3R, Archemar, sam Apr 3 '17 at 2:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    That's three files. What are you trying to do? – l0b0 Apr 1 '17 at 22:50
  • Append temp1 to temp2, temp3 is optional. – ignatius Apr 1 '17 at 22:52

To append a file to another:

cat input_file >> output_file
  • Awesome. Thank you much. I can't believe I forgot how to do this. – ignatius Apr 1 '17 at 22:56

To create temp3 file as a concatenation of the files temp1 and temp2 :

cat temp1 temp2 > temp3

Not the answer you're looking for? Browse other questions tagged or ask your own question.