commit: f5fa7631dd38adf4e78be51ce7b8d180d0d9c225
parent 24b24a8dc5b4a18ff05e02ca083dcf4094a86769
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 19 Jun 2021 03:59:17 +0200
bin/wordsort: new
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/Makefile b/bin/Makefile
@@ -6,7 +6,7 @@
include Makefile.config
include ../Makefile.common
-EXE += zalgo
+EXE += wordsort zalgo
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
diff --git a/bin/wordsort b/bin/wordsort
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Uses -z on sort(1), present in GNU, FreeBSD, OpenBSD, BusyBox ; absent in NetBSD
+tr ' ' '\000' | LC_ALL=C.UTF-8 sort -z | tr '\000' ' '