Skip to content

Instantly share code, notes, and snippets.

@skorotkiewicz
Created December 8, 2016 15:11
Show Gist options
  • Save skorotkiewicz/6aeb3c87805059fb83dde1d28b7c1b27 to your computer and use it in GitHub Desktop.
Save skorotkiewicz/6aeb3c87805059fb83dde1d28b7c1b27 to your computer and use it in GitHub Desktop.
Get URL and Images from website in Bash
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