Regular expression with grep
bruce <[email protected]>
| Newsgroups | gmane.org.user-groups.aclug.linux-help |
|---|---|
| Message-ID | <20030326035351.QWFZ3331.lakemtao06.cox.net@there> |
I have a large file which is a concatination and sort of two files, one from msdos and the other from linux. Each line is a single word. grep doesn't work as I expected on this file. Examination revealed some lines end with "(space)LF" and some end with "CR/LF". I want to eliminate the CR and the space. I tried cat foo |sed s/\x0d\x0a/\x0a/ and it didn't do anything. A test run of cat foo |grep \x0d finds nothing. Neither does cat foo |grep \x61. cat foo |grep a finds lots of words with an "a" in them. I tried many combinations of quotes, parentheses, braces, brackets, single quotes and nothing works with grep or sed. Several books and a search of the web didn't turn up anything useful. Any help? bruce -- This is the [email protected] list. To unsubscribe, visit http://www.complete.org/cgi-bin/listargate-aclug.cgi