1 #!/bin/bash 2 3 # A very crude script that tries to find the rss feed of a page and then print 4 # the articles titles' from that feed 5 6 printf "Please enter URL: " 7 read -r url 8 9 10 for rss in $(curl $url 2> /dev/null | sed -n 's/<link rel="alternate".*href="\(.*\)"[^>]*>/\1/p') 11 do 12 echo "---------------------------------------------------------------------" 13 echo "Printing titles from $url 's feed: $rss" 14 echo "---------------------------------------------------------------------" 15 curl $rss 2> /dev/null | sed -n 's/<title>\(.*\)<\/title>/\1/p' 16 done