1
diff -ruN -x configure -x '*~' -x build-tree.orig -x '*.rej' build-tree.orig/apache2/support/check_forensic build-tree/apache2/support/check_forensic
2
--- build-tree.orig/apache2/support/check_forensic 2004-04-12 18:32:16.000000000 +0100
3
+++ build-tree/apache2/support/check_forensic 2005-01-18 12:12:10.634412064 +0000
8
-cut -f 1 -d '|' $F > /tmp/fc-all.$$
9
-grep + < /tmp/fc-all.$$ | cut -c2- | sort > /tmp/fc-in.$$
10
-grep -- - < /tmp/fc-all.$$ | cut -c2- | sort > /tmp/fc-out.$$
11
+all=`mktemp -t fcall.XXXXXX || tempfile --prefix=fcall` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
12
+in=`mktemp -t fcin.XXXXXX || tempfile --prefix=fcin` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
13
+out=`mktemp -t fcout.XXXXXX || tempfile --prefix=fcout` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
14
+trap "rm -f -- \"$all\" \"$in\" \"$out\";" 0 1 2 3 13 15
16
+cut -f 1 -d '|' $F > $all
17
+grep + < $all | cut -c2- | sort > $in
18
+grep -- - < $all | cut -c2- | sort > $out
20
# use -i instead of -I for GNU xargs
21
-join -v 1 /tmp/fc-in.$$ /tmp/fc-out.$$ | xargs -I xx egrep "^\\+xx" $F
22
-rm /tmp/fc-all.$$ /tmp/fc-in.$$ /tmp/fc-out.$$
23
+join -v 1 $in $out | xargs -i xx egrep "^\\+xx" $F