#!/bin/sh

if [ $# = 0 ]; then
  exit 1
fi

case "$1" in
  *gz) CAT="gunzip -c" ;;
  *Z)  CAT="uncompress -c" ;;
  *)   CAT="cat" ;;
esac

$CAT "$@" | grep 'N =' | grep 'bound)' | tr -d '(' \
    | awk '{print ++i, $6, $7;}' \
    | plot_data -q -x 'log #' -y 'N, N_bound' -c 1 2 3 -C green red \
		-h "Data from $*"
