• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

help: unix gurus ... sed command

LordSnailz

Diamond Member
hey guys, need a big help here ... been racking my brain over this stupid sed command ...

I have a file with a line that reads -
apple=red

I want to search and replace every instance of that to
kiwi=green
grape=purple

but I keep on getting it to change to kiwi=green\ngrape=purple. For some reason I can't add the carriage return in the sed command.

This is what I've tried --> sed -e "s?apple=red?kiwi=green/\ngrap=purple?g"

any suggestions, is it doable in sed? any help is appreciated, TIA!
 
is this in windows? perhaps you need a \r in the file as well?

where do you see the "\n"s? in emacs or some other editor?
 
this is in unix ... using vi ...

is it true that older version of sed won't let you do it? argh this is driving me insane
 
Back
Top