hackernews_top_stories (402B)
1 #!/bin/bash 2 3 # return something if there are hacker news stories with score >1000 4 # (see stuff that's really interesting, or major security vulnerabilities) 5 # very dirty: TODO better parsing, TODO use the API 6 7 curl -s 'https://news.ycombinator.com/news' | grep -B1 'class="score"' | 8 grep -B1 ">.... points<" | grep 'class="title"' | 9 sed 's/.*href="http\([^>]*>[^<]*\).*/http\1/g' | sed 's/">/ /g' 10