I’m trying to eliminate channels I’m not interested in from my channel list. My IPTV provider produces a m3u file of 18MB, listing channels from countries all over the world. I’ve used grep to reduce that to about 342KB, but there are still too many channels to wade through to find the ones I’m interested in.
Can anyone help me whittle this list down further. I’ve selected by the country codes I’m interested in but I need help in excluding some of these selected channels. For instance I select channels with US, UK and CA, but I’m not interested in channels labeled “US: NHL” and “US: NBA”.
My current grep statement is:
grep -E ‘tvg-name="(US|CA|UK)’ -A 1 /home/osmc/iptvlist/full.m3u |sed “/^–$/d”
A few lines of the (sanitized) input file are:
#EXTM3U
#EXTINF:-1 tvg-ID=“” tvg-name=“US: TUDN” tvg-logo=“” group-title=“US-Sport”,US: TUDN
http://link.comstar.tv:8080/live/12345678/1234567/492620.ts
#EXTINF:-1 tvg-ID=“” tvg-name=“US: Baby First TV” tvg-logo=“” group-title=“US - Kids”,US: Baby First TV
http://link.comstar.tv:8080/live/12345678/1234567/2127743.ts
#EXTINF:-1 tvg-ID=“” tvg-name=“US: NHL Pittsburgh Penguins” tvg-logo=“” group-title=“US-Sport”,US: NHL Pittsburgh Penguins
http://link.comstar.tv:8080/live/12345678/1234567/448497.ts
#EXTINF:-1 tvg-ID=“” tvg-name=“US: NHL Philadelphia Flyers” tvg-logo=“” group-title=“US-Sport”,US: NHL Philadelphia Flyers
http://link.comstar.tv:8080/live/12345678/1234567/448496.ts
Thanks for any suggestions.