[LLVMdev] Trailing whitespace removal complete

Tom Brown tdbrown at uiuc.edu
Thu Apr 21 17:35:47 PDT 2005


On Thu, Apr 21, 2005 at 07:26:00PM -0500, Misha Brukman wrote:
> OK, I'll trade you -- can you tell me how I can grep for a tab within a
> file?  The following don't work for me:
> 
> grep '\t' 
> grep '^T' 
> grep '^I' 
> 
> Tried with grep and egrep.

I think the problem is the shell. Try grep "`printf '\t'`"
See
http://lists.gnu.org/archive/html/bug-textutils/2002-06/msg00019.html

I often use perl in these sorts of cases ...
find | xargs perl -n -e '/\t$/ and print'

Lurker Tom

-- 
Tom Brown   tdbrown at uiuc.edu   Siebel Center 2107   +1 (217) 778-7908




More information about the llvm-dev mailing list