Files
invid-conv/yt-conv

18 lines
217 B
Bash
Executable File

#!/bin/bash
if [ $# -ne 1 ]
then
>&2 echo "Usage: $0 <url>"
exit 1
fi
if [ "$1" = "-h" ]
then
echo "Usage: $0 <url>"
exit 0
fi
URL="$1"
YT_URL="${URL//https:\/\/*\//https:\/\/www.youtube.com\/}"
echo "$YT_URL"