I have a file that looks like this:
#EXTM3U
#EXTINF:-1 tvg-id="A&E [Brazil]" tvg-name="A&E **" tvg-logo="http://url/2dhy3yl" group-title="FILMES & SERIES",A&E **
http://url/live/Enrico/321/6660.ts
#EXTINF:-1 tvg-id="A E [Brazil]" tvg-name="AeE" tvg-logo="http://url/2dhy3yl" group-title="FILMES & SERIES",AeE
http://url/live/Enrico/321/232.ts
#EXTINF:-1 tvg-id="A&E [Brazil]" tvg-name="BR: AeE *" tvg-logo="http://URL/2dhy3yl" group-title="FILMES & SERIES",AeE *
http://url/live/Enrico/321/5171.ts
#EXTINF:-1 tvg-id="A&E HD [Brazil]" tvg-name="A&E HD" tvg-logo="http://URL/2dhy3yl$
http://url/live/Enrico/321/4057.ts
I want to remove everything that contains ** (double asterisk), single asteris followed by double quotes (*") and the (tvg-name="BR:) string. I managed to do it with sed but it doesnt run on php shell_exec();
Here is my sed code
sed -i '/\*\*/d' ./filename
sed -i '/tvg-name="BR:/d' ./filename
sed -i '/\*"/d' ./filename
How do i execute this with shell_exec or any other php function? Thank you!