grep tab | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

grep tab

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 11-11-2001
AkumaTay AkumaTay is offline
Registered User
 
Join Date: Jul 2001
Last Activity: 14 November 2002, 7:54 AM EST
Location: Malaysia
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
grep tab

I want to grep "xxx(tab)iii" but dunno the way to do it.


I've tried : grep "xxx\tiii" * , but it dont works.
Is there anyone that can help me?
Sponsored Links
    #2  
Old 11-12-2001
cybler cybler is offline
Registered User
 
Join Date: Nov 2001
Last Activity: 2 June 2003, 6:54 PM EDT
Location: Phoenix, AZ
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Akuma, depending on what file you are grepping, the tab may just be white space. If this is the case, try using quotes and just one space. Example:
grep "xxx iii" filename.ext

One more idea if that doesn't work. If you know of at least one entry in the file you are looking for, you can count the number of spaces your are trying to grep. It would be even more helpful if you could copy and paste what you are trying to find.
Example:
grep "xxx iii" filename.ext

I put five spaces in between in case there where originally five spaces in your tab.

Hope that helps!

-David
Sponsored Links
    #3  
Old 11-12-2001
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 30 July 2014, 10:25 PM EDT
Location: Ashburn, Virginia
Posts: 9,897
Thanks: 58
Thanked 415 Times in 249 Posts
Suppose it was a Q separating the xxx and the iii. You would just type "grep "xxxQiii" wouldn't you? The answer to your question is the same, except that instead of Q, you need to type the tab key. Tab is just another character.
    #4  
Old 11-13-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
 
Join Date: Jul 2001
Last Activity: 16 June 2011, 4:50 PM EDT
Location: Portland, OR, USA
Posts: 1,626
Thanks: 2
Thanked 15 Times in 13 Posts
With some shells, you may need to make it a literal key, though. In the case that you press tab and either nothing, or something unwanted happens, press Ctrl+V then press tab. Also, you may sometimes type \, then type tab.
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 11:33 AM.