I have a text file with 4 sentences and I want to grep the ones ending in "me", however when I do grep "me$" it doesn't work.
Am I missing something?
(I wanted the result to be the 1st, 2nd and 4th line).
Edit: Replaced image with text.
$ cat sm.txt somebody once told me somebodyoncetoldme the world was gonna roll me $ grep "me$" sm.txt $
catoutput is strange, and the spaces before the prompt string are even stranger. Doesfile sm.txttell you it is a plain ASCII file or it it reporting DOS-style line ends?cat -e sm.txtand/orod -c sm.txtgrep 'me$' sm.txtsomebody once told me^M$ ^M$ somebodyoncetoldme^M$ ^M$ the world was^M$ ^M$ gonna roll me^M$