Before we can do anything, first we need to create our office document, but in this example I’m going to download a template file from office.com.
Once we have our document file we will be opening it up using Libre Office Writer and what we need to do is replace all of our text with place holder values.
So for example if we have a name and address at the top then we can replace our name with MyName, the first line of our address to AddressLine1 and so on.
What we will be doing is going through the steps needed to create a shell script that will be replacing these values with the final string values that we want in our document.
If you’re unfamiliar with a string, this is simple a line of text such as “The cat sat on the mat” for example.
In this example I downloaded a party flyer template file from the following address:
templates.office.com
After opening the file with Libre Office I then had to save it to create a .odt file.