I want to use awk for printing a match of some pattern, only if it is the last line of the file before some constant text.
For example, i want to print the value of "c" only if it is the last line before some constant text:
cat file.txt: a=1 b=2 c=3 ...constant text...
cat file.txt: a=1 c=3 b=2 ...constant text...
do not print anything.
How do I do that..? How can awk know if it's the last number of the file?