dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit 10ce43e9faf614d8f23e76c7ded150a28fc0d2ba
parent f01e06992911174faa4757e45c3c91791638ce60
Author: hhvn <hayden@haydenvh.com>
Date:   Sat,  6 Feb 2021 12:29:57 +0000

.scripts/bin/ytchannelid: handle multiple input uris

Diffstat:
M.scripts/bin/ytchannelid | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.scripts/bin/ytchannelid b/.scripts/bin/ytchannelid @@ -1,3 +1,6 @@ #!/bin/sh -curl -qsL $1 | tr '}{,' '\n' | grep channelId | head -n 1 | sed 's/.*\\":\\"//;s/..$//' | awk '{print "https://www.youtube.com/feeds/videos.xml?channel_id=" $0}' | tee /dev/stderr | xclip +for u in $@ +do + curl -qsL $u | tr '}{,' '\n' | grep channelId | head -n 1 | sed 's/.*\\":\\"//;s/..$//' | awk '{print "https://www.youtube.com/feeds/videos.xml?channel_id=" $0}' +done | tee /dev/stderr | xclip