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
$
cat
output is strange, and the spaces before the prompt string are even stranger. Doesfile sm.txt
tell you it is a plain ASCII file or it it reporting DOS-style line ends?cat -e sm.txt
and/orod -c sm.txt
grep 'me$' sm.txt
somebody once told me^M$ ^M$ somebodyoncetoldme^M$ ^M$ the world was^M$ ^M$ gonna roll me^M$