dot_testing/sh/trss-yt-id

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