summaryrefslogtreecommitdiffstats
path: root/etc/hypermail/reverse-summary-order.sh
diff options
context:
space:
mode:
authorSergey Lukin <sergej.lukin@gmail.com>2015-09-14 15:32:39 +0300
committerSergey Lukin <sergej.lukin@gmail.com>2015-09-14 16:17:22 +0300
commitebf801ed672b13c2081288e0d54ff067ba386af2 (patch)
treedffbbe9b7e829b54e5f22c773fe2264a4fe08fe8 /etc/hypermail/reverse-summary-order.sh
downloadlists.alpinelinux.org-master.tar.bz2
lists.alpinelinux.org-master.tar.xz
initial commitHEADmaster
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