I have the following file:
cat regex16.txt gives
foo bar baz
bar foo baz
baz foo bar
bar baz foo
foo baz bar
baz bar foo
I want to grep only the lines which end with bar.
So, I am using $ symbol to grep for bar. But, I don't get any results. What am I doing wrong here?
grep '.*bar$' regex16.txt
Why bar$ isn't working here?