#!/bin/sh
#
# method-filter
# Log GET requests separately from other HTTP methods

GET_LOG=/usr/local/apache/logs/get_log
OTHER_LOG=/usr/local/apache/logs/other_log

while /bin/true;
do
   read entry
   if [ `echo "$entry" | grep -c 'GET'`];
   then
      echo "$entry" >> $GET_LOG &
   else
      echo "$entry" >> $OTHER_LOG &
   fi
done
