#!/bin/sh

# Arg 0 is the file with all the types
# Arg 1 is aw log file
# Arg 2 is the prefix for the output files

types=${1:-"types"}
log=${2:-"log"}
prefix=${3:-"out"}

echo $types $log $prefix

for i in `cat $types`; do echo $i; grep -F $i $log | awk '{print $1 " " $3}' > ${prefix}.$i; done 
