[Nottingham] how does one grep for tabs?

Dan Mackdermott dan at inputlink.net
Tue Jan 31 18:33:07 GMT 2006


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 {} \;

Cheers,

Dan

-- 
Dan Mackdermott RHCE (Director)
InputLink Consulting Ltd
http://www.inputlink.net
t: +44 (0)115 988 1700
m: +44 (0)7980 711 557



More information about the Nottingham mailing list