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 you


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 you