You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command host -t A api.opennicproject.org
currently outputs
api.opennicproject.org is an alias for api.opennic.org.
api.opennic.org has address 116.203.98.109
Unfortunately the awk filter does not recognize the address because it is looking for "api.opennicproject.org" and "has address" in the same line.
In my docker container is only nslookup available. Therefore I have added the following lines which also have to deal with multiline filtering.
if which nslookup > /dev/null 2> /dev/null; then
nslookup -type=a api.opennicproject.org "$1" | awk '$1=="Name:"{s=1;next} s == 1 && $1 == "Address:" { print $2; exit; } { s=0; }'
return 0
fi
At least this is working on my Linux test servers. I would be happy if you add my code to the script.
May I suggest to rewrite the host-awk-pipeline in a similar manner?
Greetings from Germany
Andreas
The text was updated successfully, but these errors were encountered:
The command
host -t A api.opennicproject.org
currently outputs
Unfortunately the awk filter does not recognize the address because it is looking for "api.opennicproject.org" and "has address" in the same line.
In my docker container is only nslookup available. Therefore I have added the following lines which also have to deal with multiline filtering.
At least this is working on my Linux test servers. I would be happy if you add my code to the script.
May I suggest to rewrite the host-awk-pipeline in a similar manner?
Greetings from Germany
Andreas
The text was updated successfully, but these errors were encountered: