The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com



UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Array with special Characters donaldfung UNIX for Dummies Questions & Answers 1 06-08-2008 12:18 PM
Grep with Special Characters Vashj Shell Programming and Scripting 6 11-27-2007 06:51 AM
Special Characters in directory name tez UNIX for Dummies Questions & Answers 6 08-14-2006 07:06 PM
special characters nawnaw UNIX for Dummies Questions & Answers 2 05-18-2004 03:17 PM
awk/sed with special characters apalex Shell Programming and Scripting 5 05-06-2002 04:40 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 3.50 average. Display Modes
  #1 (permalink)  
Old 06-12-2008
guruparan18 guruparan18 is offline
Registered User
  
 

Join Date: May 2008
Location: India
Posts: 37
Question grep with special characters

Hi there

I need to grep for a detail from a file. The pattern to search for involves escape sequences in it. This causes for the problem.

Code:
grep "P\_SOME\_STRING\_SEARCH" filename
Note, I have line like below in the file and expect it to grep.

Code:
 select *
   from my_system_param
 where param_name = 'P\_SOME\_STRING\_SEARCH' escape '\';
Thanks in advance.
  #2 (permalink)  
Old 06-12-2008
robotronic's Avatar
robotronic robotronic is offline Forum Advisor  
Can I play with madness?
  
 

Join Date: Apr 2002
Location: Italy
Posts: 370
Code:
grep -F "P\_SOME\_STRING\_SEARCH" filename
  #3 (permalink)  
Old 06-12-2008
guruparan18 guruparan18 is offline
Registered User
  
 

Join Date: May 2008
Location: India
Posts: 37
Heck!!!

Got the following error.

Code:
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- F
I have Sun OS 5.8 and KSH.
  #4 (permalink)  
Old 06-12-2008
robotronic's Avatar
robotronic robotronic is offline Forum Advisor  
Can I play with madness?
  
 

Join Date: Apr 2002
Location: Italy
Posts: 370
On Solaris you need to use "/usr/xpg4/bin/grep -F" or "fgrep" instead of "grep -F".
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0