I’d like to write a script that reads the content of a Macintosh text file and filters it based on a keyword.
grep -e “keyword” /Users/my_user/Desktop/testing.txt
doesn’t return the paragraphs that contain my keyword, it returns the full content of my testing.txt file. I believe the problem is caused by differences between Macintosh and UNIX regarding the carriage return (or line feed).
Is there an easy way to fix this?