Article 4VFE3 How to replace a code block with multiple lines in a file using bash script?

How to replace a code block with multiple lines in a file using bash script?

by
bmxakias
from LinuxQuestions.org on (#4VFE3)
Hello

How can i replace a code block with multiple lines in a file using bash script?

example:

in file test.php replace this:

Code: <li>
<a href="{{ route('playlists.index') }}">
<i class="{{ config('other.font-awesome') }} fa-list-ol" style=" font-size: 18px; color: #ffffff;"></i>
<span class="menu-text">Playlists</span>
<span class="selected"></span>
</a>
</li>with:

Code: <li>
<a href="{{ blabla('dokam.something') }}">
<i class="{{ power('test.font-awesome') }} fa-list-ol" style=" font-size: 20px; color: #ffffff;"></i>
<span class="test2-text">Playlists</span>
<span class="sel"></span>
</a>
</li>Checking on the net i found a few info but not many for multi line and didn't manage to get that working ...

Thank youlatest?d=yIl2AUoC8zA latest?i=_pitmkgnr6o:njTYbZkeML0:F7zBnMy latest?i=_pitmkgnr6o:njTYbZkeML0:V_sGLiP latest?d=qj6IDK7rITs latest?i=_pitmkgnr6o:njTYbZkeML0:gIN9vFw_pitmkgnr6o
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