Complete.Org: Mailing Lists: Archives: linux-help: March 2003:
[linux-help] Regular expression with grep
Home

[linux-help] Regular expression with grep

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Regular expression with grep
From: bruce <bbales@xxxxxxx>
Date: Tue, 25 Mar 2003 21:56:17 -0600
Reply-to: linux-help@xxxxxxxxx

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 linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]