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 > 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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to print single quote in awk gauravgoel UNIX for Dummies Questions & Answers 6 08-20-2008 04:48 PM
escaping single quote javeed7 Shell Programming and Scripting 3 04-02-2008 05:36 AM
single quote dreams5617 Shell Programming and Scripting 2 12-01-2007 03:37 AM
AWK handling of single quote braindrain Shell Programming and Scripting 3 04-27-2006 04:57 PM
Replacing a single quote rjsha1 Shell Programming and Scripting 3 12-23-2005 10:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-17-2006
asami asami is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 14
single or double quote in SED

i m trying the following command but its not working:

sed 's/find/\'replace\'/g' myFile

but the sed enters into new line

[root@asamiLinux root]# sed 's/find/re\'place/g' myFile
>

I havn't any idea how to put single quote in my replace string. Your early help woud be appreciated. Thanx
  #2 (permalink)  
Old 07-17-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Code:
sed "s/find/'replace'/g" myFile
  #3 (permalink)  
Old 07-17-2006
asami asami is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 14
Thanx, i tried it earlier but didn't work at that time. now i find the problem , it was a tilde which created the problem
Sponsored Links
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 10:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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