Removed logging, added output to user
parent
1a0d565183
commit
fddcb2a7d4
|
@ -37,12 +37,11 @@ while IFS= read -r line; do
|
||||||
ipv4="${ipv4%%/*}"
|
ipv4="${ipv4%%/*}"
|
||||||
ipv6="${ipv6%%/*}"
|
ipv6="${ipv6%%/*}"
|
||||||
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
|
||||||
# case "${format}" in
|
'json') printf '{"domain":"%s","ipv4":"%s","ipv6":"%s","pubkey":"%s"},' \
|
||||||
# 'json') printf '{"domain":"%s","ipv4":"%s","ipv6":"%s","pubkey":"%s"},' \
|
"${domain}" "${ipv4}" "${ipv6}" "${pubkey}" | tee -a "${LOGFILE}";;
|
||||||
# "${domain}" "${ipv4}" "${ipv6}" "${pubkey}" | tee -a "${LOGFILE}";;
|
'tsv') printf '%s\t%s\t%s\t%s\n' "${domain}" "${ipv4}" "${ipv6}" "${pubkey}" | tee -a "${LOGFILE}";;
|
||||||
# 'tsv') printf '%s\t%s\t%s\t%s\n' "${domain}" "${ipv4}" "${ipv6}" "${pubkey}" | tee -a "${LOGFILE}";;
|
*) printf 'ERROR! Invalid format for %s: %s\n' "${0}" "${format}" >>"${LOGFILE}"
|
||||||
# *) printf 'ERROR! Invalid format for %s: %s\n' "${0}" "${format}" >>"${LOGFILE}"
|
exit 5;
|
||||||
# exit 5;
|
esac
|
||||||
# esac
|
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue