[Nottingham] how does one grep for tabs?

Dan Mackdermott dan at inputlink.net
Tue Jan 31 19:37:16 GMT 2006

Oops, just re-read the email!  ;-)

On Tue, 31 Jan 2006, Dan Mackdermott wrote:

> Hi Michael,
> On Tue, 31 Jan 2006, Michael Erskine wrote:
>> I'm searching for files that contain tab characters (ASCII 0x09, Ctrl-I -- 
>> so
>> that I can eradicate them with expand(1)! ) but I can't use interactive 
>> bash
>> to grep(1) for them because it won't let me type a tab! I found a 
>> roundabout
>> way by avoiding the use of interactive bash but I'm interested in how 
>> others
>> might solve this conundrum.
> Press ^V for a literal before typing in the tab, you will probably want to 
> escape it as well e.g.
> $ find blah -name \*\<tab>\* -exec rm {} \;

To grep the contents of the file, you can use the following line...

gerp -l \<tab> *

For the '<tab>' part, press ^V then TAB...



Dan Mackdermott RHCE (Director)
InputLink Consulting Ltd
t: +44 (0)115 988 1700
m: +44 (0)7980 711 557

More information about the Nottingham mailing list