How can I use sed to perform this replacement?

Viewed 115

I need to replace a line in file with something

#Banner none

to

Banner /etc/motd

I tried:

sed -i "s/^#Banner none/Banner /etc/motd/" /root/testfile.sh

which is not working. Do you know how I can do what I want?

2 Answers
Related