From 9b8f2237769613f4c07400fdf8bfbf911f6ceaa7 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 22 Jul 2019 12:50:35 +0000 Subject: [PATCH] Add wiki-sections-sort --- wiki-sections-sort | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 wiki-sections-sort diff --git a/wiki-sections-sort b/wiki-sections-sort new file mode 100755 index 0000000..0b0ec22 --- /dev/null +++ b/wiki-sections-sort @@ -0,0 +1,3 @@ +#!/bin/bash +# Sort == level-two wiki sections == alphabetically while keeping all section contents (including subsections) in the given order +tr '\n' '\r' | sed 's,\r== ,\n== ,g' | sort | tr '\r' '\n'