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

[linux-help] Re: 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] Re: Regular expression with grep
From: bruce <bbales@xxxxxxx>
Date: Wed, 26 Mar 2003 18:31:12 -0600
Reply-to: linux-help@xxxxxxxxx

On Wednesday 26 March 2003 05:15 pm, you wrote:
> Have you tried "sed s/.$//" ?
> Since every line has EITHER an extra space OR an extra CR character,
> you can just use the wildcard.
> Obviously if some lines just have a word with a LF following it, this
> will not work. Then you would want to consider something
> like "s/[a-zA-z]$/&!/" to add a character to the lines that don't
> already have one.
Thanks Alden.  That worked.  I did a short visual search and couldn't 
find any lines that didn't have two characters, but with 76,000 lines I 
couldn't look at all.  Now all I see have only LF.

Just for my own edification, is there any way to grep for a certain 
non-printing ascii character?  The Linux programming bible says \xyy 
would find ascii yy, for instance \x07 finds the ascii bell.  But I 
wonder if maybe that only works in perl.

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]