- Nov 2, 1999
- 4,821
- 0
- 0
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!
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!