dot_testing/sh/trss-yt-id
2022-07-18 22:07:17 -05:00

9 lines
202 B
Bash
Executable File

#!/bin/sh
[ -z "$1" ] && exit 1
curl "${1}" -s | \
grep 'youtube/www\.youtube\.com/channel/.\{24\}' -o | \
awk -F'/' '{print "https://www.youtube.com/feeds/videos.xml?channel_id=" $NF}' | \
sed 1q