BEGIN { flag=0; } /./ { if (!flag) { if ($0 ~ /DO NOT DELETE THIS LINE/) { print; flag = 1 } else { print } } }