I apologize if I didn't ask this question properly. It was kind of confusing. But for a visual example if I have this txt file:
| $100 on the first line
| $654 on the second line
| $123 on the third line
| $111 on the fourth line
How could I find the last time $
was used to print out 111
?