Can some-one help me parsing this in pure bash:
#EXTINF:-1 tvg-chno="729" tvg-id="Pluto TV Kids" tvg-name="Pluto TV Kids" tvg-logo="https://images.pluto.tv/channels/51c75f7bb6f26ba1cd00002f/colorLogoPNG.png" group-title="PlutoTV" group-title="Kids",Pluto TV Kids
Into separate values of each element. I want to do this in pure bash. (utils like grep and sed are allowed)
I searched around and found some solutions. But these are based on the position of each element. So if the order is changed, I can rewrite the stuff.
Ideally, I would like to have separate variables which contains the value.
So variables:
tvg-id
tvg-chno
tvg-logo
group-title (2 values)
A regex expression: tvg-id="(.*?)"
would do the job. Only how can I use this in a bash script?
Edited by doglover, 12 August 2020 - 09:46.