I'm looking to output all lines from a log file after a certain trigger word. What I have so far is
but there must be a better way using sed or awk.
Any hints please?
Ceci n'est pas une signature
Columb Healy
Code:
last_occurence=$(grep -n $trigger $file|tail -1|cut -d : -f 1)
line_count=$(wc -l $file)
required_lines=$(expr $line_count - $last_occurence)
tail -$required_lines $file
Any hints please?
Ceci n'est pas une signature
Columb Healy