I have a script running in linux which is simply multiple function calls outputted into a file. I have a function which is an overview of important information That I would like to append to the top of the file for easy viewing.

The problem is that I cannot simply call this overview function first because it is dependant on previous functions. 

Is there an easier way to do this without creating a temp file? This is a fairly large file and that would take pretty long.