Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

using Grep with a tab

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-02-2007
Adriel Adriel is offline
Registered User
 
Join Date: Mar 2007
Last Activity: 2 May 2007, 10:39 AM EDT
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 Unix and Linux 05-02-2007
Shell_Life's Unix or Linux Image
Shell_Life Shell_Life is offline
Registered User
 
Join Date: Mar 2007
Last Activity: 21 June 2012, 3:19 PM EDT
Location: Bahia, Brazil
Posts: 1,203
Thanks: 1
Thanked 103 Times in 100 Posts
Adriel, just type the <TAB> in between the two strings.
It works for me.
Sponsored Links
    #3  
Old Unix and Linux 05-03-2007
anbu23's Unix or Linux Image
anbu23 anbu23 is offline Forum Advisor  
Advisor
 
Join Date: Mar 2006
Last Activity: 18 July 2016, 7:20 AM EDT
Location: Bangalore,India
Posts: 2,152
Thanks: 21
Thanked 159 Times in 150 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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 09:53 AM.