#!/bin/bash if [ "${1#*$'watch?v='}" != "$1" ] then VIDID=`echo $1|awk -F '=' '{print $NF}'` else VIDID=`echo $1|awk -F '/' '{print $NF}'` fi printf https://img.youtube.com/vi/$VIDID/0.jpg\; printf "`curl -s https://www.youtube.com/watch?v=$VIDID|tr "\<" "\n"|grep -e "og:title"|cut -d'"' -f4|tr -d '[:punct:]'`" printf \; echo https://www.youtube.com/watch?v=$VIDID\;