Last active
August 29, 2015 14:20
-
-
Save aalemayhu/1355e7fd1c639cf4a814 to your computer and use it in GitHub Desktop.
Fetch page as text file using the title for filename
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
#!/bin/sh | |
url="$1" | |
# http://stackoverflow.com/questions/11711339/getting-webpage-title-img-metadata-info-from-linux-terminal | |
title=$(wget $url -O - | grep \<title\>|sed "s/\<title\>\([^<]*\).*/\1/" | tr ' ' '_') | |
links -dump $url >> "$title".txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment