I can add a 4th option just for completeness:
4. keep a modified copy in the script.
This can be done if the configuration file is small, it can even be base64 encoded if it's binary or requires specific end-of-lines, such things.
I'd personally avoid the 3rd solution, that's both not user friendly and error-prone.
Any other 3 solutions are fine, depending on the context.
For the 2nd solution you can use sed, perl, awk,... There's plenty of tools for the job under Unix, since text processing was the first usage for this platform ;)
If you can tell a bit more about the file format, I probably can help with that.