Last active
November 10, 2020 09:29
-
-
Save subhanshuja/e7906aad0083c4a58485ef704e926e2b to your computer and use it in GitHub Desktop.
download file modern js without npm using bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ref: https://gist.github.com/hrwgc/7455343 | |
function validate_url(){ | |
if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then echo "true"; fi | |
} | |
# file list of url | |
file="listlib.txt" | |
while IFS= read -r line; do | |
if `validate_url $line > /dev/null`; then wget $line -P /path/lib/; else echo "doesn't exist"; fi | |
done < "$file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://unpkg.com/react@16/umd/react.development.js | |
https://unpkg.com/react-dom@16/umd/react-dom.development.js | |
https://unpkg.com/[email protected]/babel.min.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment