#! /bin/sh
# a trivial utility for getting the data out of the logs
# this file is part of FormCalc
# last modified 20 Jan 05 th


if [ $# -eq 0 ] ; then
  echo "Usage:  $0 DIR"
  echo ""
  echo "Extracts the data from the log files DIR/*"
  echo "and writes them to the file DIR.data."
  echo ""
  exit 1
fi

files=""
out=""
for arg in $* ; do
  [ -d $arg ] && arg="$arg/*"
  files="$files $arg"
  [ -z "$out" ] && out=`dirname "$arg"`.data
done

echo $out

( for file in $files ; do
    sed 's/^|//
	t
	d' $file
  done ) > $out


