# usage: awk -f tail-after.awk TARGET= [INCLUDE=1] filename BEGIN {printit = 0} { if (index($0,TARGET)) { if (printit||INCLUDE) print; printit = 1; next } if (printit) print }