Inserting text from a file after a pattern in a file.
Its like copying and pasting for Linux on the command line.
Let’s take the following file which is missing the entire body of the message. We will call this file email.txt.
And let’s also take the following 3 files for our messages:
To make email messages from all of these messages, you can use the following (make sure to use double quotes around the sed command for evaluating the bash variable):