fix header row

This commit is contained in:
Matthew Saunders Brown 2024-02-12 10:46:31 -08:00
parent fcd7e75ce1
commit 82422fdd84

View File

@ -33,7 +33,8 @@ SEARCH=($(/usr/local/sbin/pdns-search.sh -q hostname=$hostname/$query -c))
# check for header row output, this indicates one or more results were found
if [[ "${SEARCH[0]}" = "content,name,object_type,type,zone,zone_id" ]]; then
# remove header row
# echo header and remove header row
echo zone
SEARCH=("${SEARCH[@]:1}")
# check each row to verify data and output zone (domain) if it validates
for ROW in "${SEARCH[@]}"; do