Linux Shell Scripts

#!/bin/bash
url=$1 && file=”${url##*/}” && wget $url && extension=”${url##*.}” && echo -e “\n\n”

if [ $extension = ‘js’ ]
then
echo -e “Generate JS HTML output\n”
echo -ne “\n\n”

elif [ $extension = ‘css’ ]
then
echo -e “Generate CSS HTML output\n”
echo -ne “\n\n”

elif [ $extension = ‘webp’ | $extension = ‘png’ | $extension = ‘webp’ | $extension = ‘png’]
then
echo -e “Generate CSS HTML output\n”
echo -ne “\n\n”

else echo -ne “integrity=\”sha256-” && echo -ne openssl dgst -sha256 -binary url | openssl base64 -A && echo -e “\” crossorigin=\”anonymous\”\n\n”
fi

Leave a Reply

Your email address will not be published.