A slashdot headline grabbing script
Apr 30, '03 09:28:00AM
Contributed by: yold
This shell script parses the XML slashdot file and retrieves the latest headlines, based on the ThinkGeek quote retriever.
Installation
- Copy and paste this entire script into a plain text file.
#!/bin/sh
#Yold's Slashdot newsfeed reader
echo "Current Slashdot Headlines"
curl -s http://slashdot.org/slashdot.xml | \
sed -n -e '/title/p' | \
sed -e 's/<[^>]*>//g' > /tmp/slash.txt
cat /tmp/slash.txt | more
- Name the script slashreader.sh, save to your home directory.
- Open a terminal, and type chmod a+x ~/slashreader.sh to make the file executable.
- Add alias slashreader "sh ~/slashreader.sh" to your .cshrc file in your home directory.
- Type slashreader in the terminal
This will display a list of the current headlines, so you can see if there's anything new of interest you'd like to read.
Comments (3)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030425000830370