#! /bin/sh ## wwwoffle-watch -- Show what wwwoffle is/was busy fetching ## Copyright : http://www.fsf.org/copyleft/gpl.html ## Author : Dan Jacobson -- http://jidanni.org/comp/wwwoffle/ ## Created On : Feb 2003 ## Last Modified On: Tue Jul 8 14:31:59 2003 ## Update Count : 69 # run this script while fetching case "$*" in --help|-\?)exec cat<<\EOF options: -s by size, no watch(1) -l long lines that wrap EOF ;; -l) ;;#for long lines that wrap "") : ${columns_treatment="|colrm "$((`tput cols`+1))};;#works for me -s) wwwoffle-ls lasttime|cut -c 24-|sort -n; exit;; #by size, no watch *) echo $0: "$*": unknown options, try --help 1>&2; exit 4;; esac command="wwwoffle-ls lasttime|tac|awk "\''{sub(/^http:\/\//,"",$6); printf "%6s %s %s\n",$2,substr($5,3),$6}'\'$columns_treatment #tac: easier than tail and the a lot of $LINES biz #Assume http are the majority so don't say it. #Use just minutes of date field. watch -d $command #I don't set COLUMNS else trigger some bug. e.g. #COLUMNS=33 watch -d cat /etc/motd #is always highlighted