Article 6K45T sed not working in bash script

sed not working in bash script

by
Linux_Kidd
from LinuxQuestions.org on (#6K45T)
This line works from bash shell cli.
GNU bash, version 5.0.0(1)

But not if I place it into a bash script.

In cli is does just that, adds START END after permissions tag
In script, nothing happens.

Bad syntax inside a script?

sed -i -e "/\<permissions\>/a \<\!-- START -->\n\<\!-- END --\>" myfile
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments