An Easy Way to Use Library Functions Using library functions in awk can be very beneficial. It encourages code re-use and the writing of general functions.
Programs are smaller, and therefore clearer.
Loop through the arguments, saving anything that doesn't represent awk source code for later, when the expanded program is run. For any arguments that do represent awk text, put the arguments into a temporary file that will be expanded. There are two cases. This text is just echoed directly. The echo program will automatically supply a trailing newline.