summaryrefslogtreecommitdiffstats
path: root/etc/hypermail/reverse-summary-order.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/hypermail/reverse-summary-order.sh')
-rwxr-xr-xetc/hypermail/reverse-summary-order.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/hypermail/reverse-summary-order.sh b/etc/hypermail/reverse-summary-order.sh
new file mode 100755
index 0000000..4845cac
--- /dev/null
+++ b/etc/hypermail/reverse-summary-order.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ -n "$1" ]; then
+ echo "" > /tmp/summary-rows
+ while read line; do
+ if [ -n "$(echo $line | grep '<tr><td>')" ]; then
+ echo $line >> /tmp/summary-rows
+ else
+ if [ -n "$(echo $line | grep '</table>')" ]; then
+ tac /tmp/summary-rows
+ fi
+ echo $line
+ fi
+ done < $1
+else
+ echo "Error in reverse sorting summary."
+fi