LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do i add a line with double quotes in sed? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-add-a-line-with-double-quotes-in-sed-927000/)

Beandip408 02-01-2012 03:17 PM

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?

Beandip408 02-01-2012 03:22 PM

so i solved it. i forgot the "c" so it looks like this:

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


All times are GMT -5. The time now is 09:28 PM.