I'm working on a mac, with some fairly old files. Different files were created by different programs, so some of them end with \r (mac) and some with \n (unix). I want to be able to run commands like diff, grep, etc on these files, but the ones that have \r are treated as one giant line. does anyone know of a version of diff, grep, etc that will work correctly with all new-lines?
ETA: I'd also like them to be unix utilities so I can use them in scripts, emacs, etc...