#!/bin/bash #=============================================================================== # # FILE: checkbookmarks.sh # # USAGE: ./checkbookmarks.sh # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: John Ryland (jryland@xiaofrog.com) # COMPANY: InvertedLogic # VERSION: 1.0 # CREATED: 06/21/08 12:39:19 CST # REVISION: --- #=============================================================================== plutil -convert xml1 -o /tmp/.safari_bookmarks.xml ~/Library/Safari/Bookmarks.plist # need to convert the xml to html for the purposes of wget to understand it grep "<string>http" /tmp/.safari_bookmarks.xml | sed 's/.*<string>http\(.*\)<\/string>.*/<a href=\"http\1\">http\1<\/a>/g' > /tmp/.safari_bookmarks.html wget -T 3 -t 1 --spider --force-html -i /tmp/.safari_bookmarks.html