#!/bin/sh
#
# @(#)proc-ftp.sh,v 1.3 2004/04/23 06:14:31 kim Exp
#
# Split to proc-messages and proc-xferlog.
#
# 20020126  Kimmo Suominen
#
export PATH
PATH=/usr/pkg/share/roller:/usr/pkg/sbin:/usr/pkg/bin:/bin:/usr/bin:/usr/sbin
#
TF=${TMPDIR-/tmp}/pRoC-FtP.$$
#
trap "rm -f ${TF}" 0 1 3 13 15
#
umask 022
rm -f ${TF}
touch ${TF}
cat "$@" | while read line
do
    case "$line" in
    *" xferlog: "*)
	echo "$line" | sed -e 's/^.* xferlog: //'
	;;
    *)
	echo "$line" >> ${TF}
	;;
    esac
done | proc-xferlog
proc-messages < ${TF}
