m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/yt-channel-id
diff options
context:
space:
mode:
Diffstat (limited to 'yt-channel-id')
-rwxr-xr-xyt-channel-id4
1 files changed, 4 insertions, 0 deletions
diff --git a/yt-channel-id b/yt-channel-id
new file mode 100755
index 0000000..a412974
--- /dev/null
+++ b/yt-channel-id
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+URL=$1
+curl --silent $URL | grep -Po 'channel_id=.{24}' | head -n 1 | cut -d'=' -f 2