From c165087edac8f875ded093aab8074eab43965eac Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sat, 3 Jan 2026 07:06:30 -0300 Subject: [PATCH] fix(nextcloud-mail-sync): portable email parsing --- scripts/nextcloud-mail-sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nextcloud-mail-sync.sh b/scripts/nextcloud-mail-sync.sh index 9865176..34a3b89 100755 --- a/scripts/nextcloud-mail-sync.sh +++ b/scripts/nextcloud-mail-sync.sh @@ -32,8 +32,8 @@ list_mail_accounts() { next; } id != "" && /@/ { - if (match($0, /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/, m)) { - printf("%s\t%s\n", id, m[0]); + if (match($0, /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/)) { + printf("%s\t%s\n", id, substr($0, RSTART, RLENGTH)); id=""; } }