Created
December 8, 2016 15:11
-
-
Save skorotkiewicz/6aeb3c87805059fb83dde1d28b7c1b27 to your computer and use it in GitHub Desktop.
Get URL and Images from website in Bash
This file contains hidden or 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
wget -O - 'http://www.elektroda.pl/' | \ | |
grep -o '<img src=['"'"'"][^"'"'"']*['"'"'"]' | \ | |
sed -e 's/^<img src=['"'"'"]//' -e 's/["'"'"']$//' | |
wget -O - http://stackoverflow.com | \ | |
grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | \ | |
sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment