Created
October 4, 2018 02:18
-
-
Save JupyterJones/749bd9c2e353fed7745dbc82cba8a1dd to your computer and use it in GitHub Desktop.
bash script view and save a webpage as -- currenttime.html -
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/bash | |
page="$(wget -O - $1)" | |
today=`date +%Y-%m-%d.%H:%M:%S` | |
new=$today".html" | |
echo "$page" >>$new | |
echo "$page" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
save script
make executable:
chmod +x viewpage.sh
to view and save a page.
./viewpage https://jacknorthrup.com
Results printed in terminal AND saved as current date.html.
Example:
2018-10-04.10:12:34.html