3 # check_forensic <forensic log file>
5 # check the forensic log for requests that did not complete
6 # output the request log for each one
10 temp_create_method=file
11 if test -f `which mktemp`; then
12 temp_create_method=mktemp
13 elif test -f `which tempfile`; then
14 temp_create_method=tempfile
20 case "$temp_create_method" in
25 name=`mktemp -t $1.XXXXXX`
28 name=`tempfile --prefix=$1`
31 echo "$0: Cannot create temporary file"
43 trap "rm -f -- \"$all\" \"$in\" \"$out\";" 0 1 2 3 13 15
45 cut -f 1 -d '|' $F > $all
46 grep ^+ < $all | cut -c2- | sort > $in
47 grep -- ^- < $all | cut -c2- | sort > $out
49 # use -i instead of -I for GNU xargs
50 join -v 1 $in $out | xargs -I xx egrep "^\\+xx" $F