You can use the -i option with GNU awk to load libraries. The inplace library comes by default with the GNU awk installation. Thus, you can use -i inplace to modify the original input itself. Make sure to test that the code is working as intended before using this option.