LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-01-2012, 04:17 PM   #1
Beandip408
LQ Newbie
 
Registered: Aug 2011
Posts: 20

Rep: Reputation: Disabled
how do i add a line with double quotes in sed?


here is the line:
"AStringHere"=dword:00000000


i want this to be replaced with:
"AStringHere"=dword:00000001


this is what i thought would work but doesnt:
sed -i '/"AStringHere"=dword:00000000/"AStringHere"=dword:00000001' filepath

how do i fix this?

Last edited by Beandip408; 02-01-2012 at 04:21 PM. Reason: nevermind i figured it out:
 
Old 02-01-2012, 04:22 PM   #2
Beandip408
LQ Newbie
 
Registered: Aug 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
so i solved it. i forgot the "c" so it looks like this:

sed -i '/"AStringHere"=dword:00000000/c"AStringHere"=dword:00000001' filepath
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bash/sed/awk to convert comma's not in quotes in a line with many comma's oly_r Programming 23 01-25-2012 09:53 AM
[SOLVED] How to escape single quotes in sed for multi line pattern XXLRay Linux - Software 1 07-18-2011 08:35 AM
Double Quotes Inside Double Quotes youarefunny Programming 6 06-09-2010 11:21 PM
Problems with quotes and double quotes Andruha Slackware 6 01-02-2010 05:44 PM
Using single quotes vs double quotes in PHP strings vharishankar Programming 6 07-11-2005 12:41 PM


All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration