Using sed, how do I return the last occurance of a match until the End Of File? (FYI this has been simplified)
So far I\'ve tried:
sed -n \'/ Statist
sed ':a;N;$!ba;s/.*Statistics/Statistics/g' INPUTFILE
should work (GNU sed 4.2.1).
It reads the whole file to one string, then replaces everything from the start to the last Statistics (word included) with Statistics, and prints what's remaining.
Statistics
HTH