The simplest solution is to simply send the output to a file; you can copy the file in advance so as not to overwrite the file you are reading (which otherwise could lead to unwanted behavior).
cp test.html test.html.orig awk 'your awk script here' test.html.orig >test.html
source share