Looking for a method to insert a line after the Nth occurence of a given string.
The following is close to what I'm looking for, but is line number based, versus based on the Nth occurrence of a given string.
perl -ni -e 'print; print "Put after fifth line\n" if $. == 5' inFile.txt