Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-02-2007
Registered User
 
Join Date: Mar 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
using Grep with a tab

how can i use grep to search a file with a tab, for example


Code:
grep -l "Text<TAB>Text" *.txt

Sponsored Links
    #2  
Old 05-02-2007
Shell_Life's Avatar
Registered User
 
Join Date: Mar 2007
Location: Bahia, Brazil
Posts: 1,203
Thanks: 1
Thanked 102 Times in 99 Posts
Adriel, just type the <TAB> in between the two strings.
It works for me.
Sponsored Links
    #3  
Old 05-03-2007
anbu23's Avatar
anbu23 anbu23 is offline Forum Advisor  
Registered User
 
Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,952
Thanks: 6
Thanked 79 Times in 77 Posts
Quote:
Originally Posted by Adriel
how can i use grep to search a file with a tab, for example


Code:
grep -l "Text<TAB>Text" *.txt

Replace <TAB> by actual tab key
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash - CLI - grep - Passing result to grep through pipe jcdole UNIX for Dummies Questions & Answers 1 04-29-2012 06:20 PM
Advanced grep'in... grep for data next to static element. SysAdm2 UNIX for Dummies Questions & Answers 2 01-05-2011 12:59 PM
grep for certain files using a file as input to grep and then move anita07 Shell Programming and Scripting 2 12-10-2009 03:59 AM
| help | unix | grep (GNU grep) 2.5.1 | advanced regex syntax MykC UNIX for Dummies Questions & Answers 4 10-15-2009 10:52 AM
| help | unix | grep - Can I use grep to return a string with exactly n matches? MykC UNIX for Dummies Questions & Answers 7 10-13-2009 01:57 PM



All times are GMT -4. The time now is 06:24 AM.