Limit Google searches by date
See: Easy Way to Find Recent Web Pages
date='d15' date='m3' date='y' words='unix linux shell bash' site='codesnippets.joyent.com' open -a Safari "http://www.google.com/search?q=${words// /+}&as_qdr=${date}" open -a Safari "http://www.google.com/search?q=site%3A${site}%20${words// /+}&as_qdr=${date}" # sbd - search by date # cf. also http://codesnippets.joyent.com/posts/show/1700 function sbd() { declare date site words date="${1}" words="${2}" site="${3}" if [[ $# -eq 2 ]]; then /usr/bin/open -a Safari "http://www.google.com/search?q=${words// /+}&as_qdr=${date}" elif [[ $# -eq 3 ]]; then /usr/bin/open -a Safari "http://www.google.com/search?q=site%3A${site}%20${words// /+}&as_qdr=${date}" else return 1 fi return 0 } sbd d 'unix linux shell bash' sbd m5 'unix linux shell bash' sbd y3 'unix linux shell bash' codesnippets.joyent.com