The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with GREP. syndex Shell Programming and Scripting 2 07-11-2007 10:44 AM
Grep Problem avadhani UNIX for Dummies Questions & Answers 8 06-23-2005 11:58 AM
grep problem asal_email2 UNIX for Dummies Questions & Answers 4 06-22-2005 05:49 PM
grep problem svennie UNIX for Dummies Questions & Answers 5 11-08-2004 12:29 AM
Grep problem odogbolu98 Shell Programming and Scripting 3 02-18-2003 11:53 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2004
Registered User
 

Join Date: Nov 2001
Posts: 59
Question Grep Problem

I have a large file that I am grepping to find a certain string.


grep 'C:\Data\Directory\Test.txt' test.txt


It can not find it even though I know it is in there . I know that there is a problem with the backslashes but I can't get it to work. I tried

grep 'C:/\Data/\Directory/\Test.txt' test.txt

but it did not work???
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-27-2004
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Change grep 'C:/\Data/\Directory/\Test.txt' test.txt to
grep 'C:\\Data\\Directory\\Test.txt' test.txt
Reply With Quote
  #3 (permalink)  
Old 10-27-2004
Registered User
 

Join Date: Nov 2001
Posts: 59
Thanks

That worked. Thanks
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0