c-shell, linux,
If I have file...
abc def xyz
123
abc ghi xyz
456
abc jkl xyz
789
I want the last match of /^abc.+xyz$/ to EOF...
abc jkl xyz
789
I saw this... How to grep the last occurrence of a line pattern
..and the 4th alternative of the first answer looks like what I want. But I don't understand what "flag" means in the awk. Used literally produces "flag: Event not found.". I'm not even sure this will work in c-shell.
I'm hoping this will get posted. It's a good thing to know how to do AND in my example, the pattern match is different.