From 63768893d4bae1c281a15f263d6f47024d7fc29d Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Mon, 3 Oct 2022 12:40:03 -0600 Subject: [PATCH] Search end of line --- back/lib/ips_to_peers_rxfr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/lib/ips_to_peers_rxfr b/back/lib/ips_to_peers_rxfr index 723ef2e..5627421 100755 --- a/back/lib/ips_to_peers_rxfr +++ b/back/lib/ips_to_peers_rxfr @@ -37,7 +37,7 @@ while IFS= read -r line; do ipv4="${ipv4%%/*}" ipv6="${ipv6%%/*}" printf 'Checking %s...' "${ipv4}" >>"${LOGFILE}" - domain=$(<<<"${res}" grep -B1 " ${ipv4}" | sed '/--/d' | awk '{print $2}' | paste -d " " - - | awk '{print $1}') + domain=$(<<<"${res}" grep -B1 " ${ipv4}$" | sed '/--/d' | awk '{print $2}' | paste -d " " - - | awk '{print $1}') printf '%s\t%s\t%s\t%s\n' "${domain}" "${ipv4}" "${ipv6}" "${pubkey}" >>"${LOGFILE}" # case "${format}" in # 'json') printf '{"domain":"%s","ipv4":"%s","ipv6":"%s","pubkey":"%s"},' \