I'm trying to get the last lines of a log file, and I've looked around, and found tail -f /path/to/file.log | sed '/^MYSTRING/ q'
Is a common used way!
BUT this one gets the data UNTIL it finds it match, not backwards.
Let me explain;
Logfile: (just example,not actual log ;)
Donald
Duck
Cat
Dog
MYSTRING
animal
fish
ape
The code above would output;
Donald
Duck
Cat
Dog
MYSTRING
but I want the last in the logfile AFTER the LAST MYSTRING (yes,there might be a few I there, that's why I need to do this backwards),
animal
fish
ape