Korrektur Zeilenanfang bei Suche

This commit is contained in:
Blackyfff 2021-01-04 20:53:39 +01:00
parent 4ff8f549af
commit 1c69ceca01
1 changed files with 4 additions and 4 deletions

View File

@ -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"
}