Last active
September 13, 2016 18:44
-
-
Save MitchRatquest/7856e9291c5a40ee2b179e71e8455247 to your computer and use it in GitHub Desktop.
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 | |
#wget -O NOR http://www.northofreality.com/tales/2016/7/4/the-inner-hologram 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\ /\./g' | |
#used to practice sed | |
#load front page, grab newest story | |
newest=$( wget -O NOR http://www.northofreality.com/ 2>/dev/null && grep '\/tales\/[0-9]\{4\}\/[0-9]*\/[0-9]*\/[^#]*' NOR -m 1 | sed 's/<a href="//g' | sed 's/#.*//g' | sed 's/ //g') | |
#grab newest story and format for terminal | |
wget -O NOR http://www.northofreality.com$newest 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\ /\./g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment