From 8ed42c04a81582a61b97a3304655cc5023f635f1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 18 Nov 2023 23:48:54 +0100 Subject: uni: Sed -e considered harmful --- .local/bin/uni | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to '.local/bin') diff --git a/.local/bin/uni b/.local/bin/uni index 73c6e1c..9a8d636 100755 --- a/.local/bin/uni +++ b/.local/bin/uni @@ -8,13 +8,14 @@ export NOTIFY_SHORT="${0##*/}" setup() { curl 'https://www.unicode.org/Public/UNIDATA/UnicodeData.txt' \ - | >"$DATA" sed -E \ - -e 's/;[^;]*//2g' \ - -e 's/\<(.)([A-Z]*)/\1\L\2/2g' \ - -e '/^[^;]*;"$DATA" } readonly DATA="${XDG_DATA_HOME:-$HOME/.local/share}/unicode-data" -- cgit v1.2.3