From dc87e96cca26d95b5b1befa8ba8283ae98e5ecf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 9 Dec 2019 22:25:01 +0100 Subject: [PATCH] improved group detection by optimising for numbered files --- list.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/list.sh b/list.sh index cdb99e0..b941aa7 100644 --- a/list.sh +++ b/list.sh @@ -93,7 +93,8 @@ groupmatch(){ else long="$2" short="$1" fi - com="$(expr substr "$long" 1 $((${#long} * 3 / 4)))" + # com="$(expr substr "$long" 1 $((${#long} * 3 / 4)))" + com="$(expr substr "$long" 1 $((${#long} - 3)))" cut="${short#$com}" if [ ${#cut} -lt ${#short} ]; then return 0 -- 2.39.2