factor common awk functions for CFI generation scripts into new file