[Solved] How to search for these escape characters? | 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 !!

[Solved] How to search for these escape characters?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 11-18-2012
jediwannabe jediwannabe is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 13 June 2014, 2:43 AM EDT
Posts: 50
Thanks: 6
Thanked 0 Times in 0 Posts
[Solved] How to search for these escape characters?


Code:
echo "***Enter new LISTENER_PORT (only applicable to new instance), "

I used the following:

Code:
E486: Pattern not found: echo \"\*\*\*Enter new LISTENER_PORT \(only applicable to new instanace\), \"

when I try to search for the above line, I'm not able to do it

so how do I search for the above string?

thanks
Sponsored Links
    #2  
Old 11-18-2012
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 25 July 2014, 1:29 AM EDT
Location: Galactic Empire
Posts: 3,355
Thanks: 230
Thanked 1,190 Times in 1,123 Posts

Code:
grep "echo \"\*\*\*Enter new LISTENER_PORT (only applicable to new instance), \"" file

OR

Code:
grep 'echo "\*\*\*Enter new LISTENER_PORT (only applicable to new instance), "' file

Sponsored Links
    #3  
Old 11-18-2012
jediwannabe jediwannabe is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 13 June 2014, 2:43 AM EDT
Posts: 50
Thanks: 6
Thanked 0 Times in 0 Posts
actually I'm searching the string in vi, what should be the vi command to search for such string?

thanks
    #4  
Old 11-18-2012
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 25 July 2014, 1:29 AM EDT
Location: Galactic Empire
Posts: 3,355
Thanks: 230
Thanked 1,190 Times in 1,123 Posts
in VI try:

Code:
/echo \"\*\*\*Enter new LISTENER_PORT (only applicable to new instance), \"

Sponsored Links
    #5  
Old 11-19-2012
jediwannabe jediwannabe is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 13 June 2014, 2:43 AM EDT
Posts: 50
Thanks: 6
Thanked 0 Times in 0 Posts
thanks a lot! bipinajith
Sponsored Links
    #6  
Old 11-19-2012
elixir_sinari's Avatar
elixir_sinari elixir_sinari is offline Forum Advisor  
Gotham Knight
 
Join Date: Mar 2012
Last Activity: 16 July 2014, 3:22 PM EDT
Location: India
Posts: 1,412
Thanks: 100
Thanked 495 Times in 472 Posts
Quote:
Originally Posted by bipinajith View Post
in VI try:

Code:
/echo \"\*\*\*Enter new LISTENER_PORT (only applicable to new instance), \"

I don't think there is any need to escape the double-quotes.

Code:
/echo "\*\*\*Enter new LISTENER_PORT (only applicable to new instance), "

will work just fine.
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
Replace special characters with Escape characters? laknar Shell Programming and Scripting 8 01-05-2012 11:40 PM
Searching for escape characters timcs Shell Programming and Scripting 8 05-25-2007 06:29 AM
escape characters.. sharsin2001 Shell Programming and Scripting 9 11-06-2006 09:52 AM
number of escape characters? Sebarry Shell Programming and Scripting 0 06-22-2006 04:23 PM
lp FormFeed Escape characters jgordon UNIX for Advanced & Expert Users 4 10-15-2003 02:01 PM



All times are GMT -4. The time now is 09:40 AM.