add curl based DNS lookup

master
David Kebler 2024-04-29 13:01:28 -07:00
parent 5f6108a5e2
commit b40dfc3382
1 changed files with 11 additions and 0 deletions

View File

@ -55,3 +55,14 @@ gedit() { ${GEDITOR:-xed} $@; }
unlocku () ( faillock --user $1 --reset ) unlocku () ( faillock --user $1 --reset )
rsynchg() { rsync --help | grep "\-$1"; } rsynchg() { rsync --help | grep "\-$1"; }
gip () {
if which jqx &> /dev/null; then
curl -s "https://dns.google/resolve?name=$1" | jq -r '.Answer[] | .data'
return 0
else
echo install jq to use this function
return 1
fi
}