File filter_log.sh of Package mmdebug-tools
#!/bin/sh
# Filter output of collect_logs to [start, stop] time range
# Usage ./filter_vmstat.sh START END [FILES]
START="$1"
shift
END="$1"
shift
awk '
$1=="=S" && $2 >= '$START' && $2 <= '$END' {p=1}
p==1 {print}
$1=="E=" {p=0}
' "$@"