This question already has an answer here:
I searched but did not find this answer. I am running an old RedHat 5.3 system on one server (working on upgrade to 7 in progress) but I want to send 2 text files using the mail command. I do this all the time with a single file like this:
mail username -s 'MySubject' < /home/directory/file1.txt
I tried this:
mail username -s 'MySubject' < /home/directory/file1.txt < /home/directory/file2.txt
But that send the output of the first part including the results of the mail command along with both text files.
Is there a better way to do this?