suppress jq error
parent
484f5f0c28
commit
85fee64761
|
@ -59,7 +59,7 @@ rsynchg() { rsync --help | grep "\-$1"; }
|
||||||
|
|
||||||
gip () {
|
gip () {
|
||||||
if which jq &> /dev/null; then
|
if which jq &> /dev/null; then
|
||||||
curl -s "https://dns.google/resolve?name=$1" | jq -r '.Answer[] | .data' | tail -n 1
|
curl -s "https://dns.google/resolve?name=$1" | jq -r '.Answer[] | .data' 2>/dev/null | tail -n 1
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo install jq to use this function
|
echo install jq to use this function
|
||||||
|
|
Loading…
Reference in New Issue