From 1c69ceca015c17f7359ab75ce17c78e85012e538 Mon Sep 17 00:00:00 2001 From: Blackyfff Date: Mon, 4 Jan 2021 20:53:39 +0100 Subject: [PATCH] Korrektur Zeilenanfang bei Suche --- 10-50-reverse.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/10-50-reverse.sh b/10-50-reverse.sh index e442781..d5122c3 100755 --- a/10-50-reverse.sh +++ b/10-50-reverse.sh @@ -16,12 +16,12 @@ ReverseServerName=aquarius.gw.fff.community. ################################################################# function GetZoneFileSerial() { - local FirstSOALineAndFollowing="/\S\+\s\+IN\s\+SOA\s/,\$!d;" + local FirstSOALineAndFollowing="^/\S\+\s\+IN\s\+SOA\s/,\$!d;" local RemoveComments=":a;s/;.*$//g;" - local EleminateLineBreaks=":a;N;\$!ba;s/\n//g;" - local SearchPrintSerial="s/\S\+\s\+IN\s\+SOA\s\+\S\+\s\+\S\+\s\+(\?\s\+\([0-9]*\).*/\1/" + local RemoveLineBreaks=":a;N;\$!ba;s/\n//g;" + local SearchPrintSerial="s/^\S\+\s\+IN\s\+SOA\s\+\S\+\s\+\S\+\s\+(\?\s\+\([0-9]*\).*/\1/" - local Serial=$(sed -e "$FirstSOALineAndFollowing""$RemoveComments""$EleminateLineBreaks""$SearchPrintSerial" "$1") + local Serial=$(sed -e "$FirstSOALineAndFollowing""$RemoveComments""$RemoveLineBreaks""$SearchPrintSerial" "$1") echo "$Serial" }