Compare commits

..

3 Commits

Author SHA1 Message Date
David Kebler cdfd40e20d added public ip as function 2024-04-29 13:05:43 -07:00
David Kebler 7d9a9b2a5b get publicip with curl 2024-04-29 13:03:08 -07:00
David Kebler b40dfc3382 add curl based DNS lookup 2024-04-29 13:01:28 -07:00
2 changed files with 18 additions and 1 deletions

View File

@ -55,3 +55,18 @@ 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
}
gpip () {
curl https://ipv4.nsupdate.info/myip
}

View File

@ -74,3 +74,5 @@ fi
alias portl="ss -tunl | grep" alias portl="ss -tunl | grep"
alias ipg="ip addr show | grep -A1 " alias ipg="ip addr show | grep -A1 "
alias pubip="curl https://ipv4.nsupdate.info/myip; echo"