From b8416eabd2d0ca512d8fb82af18a720ee2077b86 Mon Sep 17 00:00:00 2001 From: Shahin Agha-Ghassem Date: Mon, 3 Apr 2023 19:59:59 +0200 Subject: [PATCH] Refactor to not use experimental -P grep flag --- iptv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iptv b/iptv index 5c4cc9d..0b405ce 100755 --- a/iptv +++ b/iptv @@ -78,7 +78,7 @@ fi selected_channel=$(echo "$selected" | sed 's/.*\(\[CH:[0-9]\+\]\).*/\1/') selected_channel_line=$(cat "$channels_file" | grep -F "$selected_channel") -selected_channel_url=$(echo "$selected_channel_line" | grep -oP 'url:\K.*' | tr -d '\r') +selected_channel_url=$(echo "$selected_channel_line" | grep -oE 'url:(.*)' | sed 's/url://' | tr -d '\r') selected_channel_name=$(echo "$selected_channel_line" | sed 's/\(.*\) url:.*/\1/') printf "Playing %s from %s" "$selected_channel_url" "$selected_channel_name"