#!/bin/sh - log="${MICQLOG-$HOME/.icq/micq.log}" # rollmicq - rollover the micq log file, summarizing and truncating it # Steve Kinzler, kinzler@cs.indiana.edu, Aug 98 # http://www.cs.indiana.edu/~kinzler/home.html#web case "$1" in -h) cat << EOF 1>&2 usage: $0 [ -k ] -k keep the log file, ie don't truncate it EOF exit 1;; esac sed '/ [12][0-9][0-9][0-9] User logged /d; /^[ ]*$/d' < "$log" && case "$#" in 0) > "$log";; esac