fix missing awk
parent
bf6e5e85ee
commit
8502fb04a9
|
@ -119,7 +119,7 @@ echo "$myip"
|
||||||
getip () {
|
getip () {
|
||||||
[[ ! $1 ]] && return 1
|
[[ ! $1 ]] && return 1
|
||||||
if ip=$(getent ahostsv4 $1); then
|
if ip=$(getent ahostsv4 $1); then
|
||||||
echo $ip | grep STREAM | '{ print $1 ; exit }'
|
echo $ip | grep STREAM | awk '{ print $1 ; exit }'
|
||||||
else
|
else
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10,7 +10,7 @@ local conf
|
||||||
_getip () {
|
_getip () {
|
||||||
[[ ! $1 ]] && return 1
|
[[ ! $1 ]] && return 1
|
||||||
if ip=$(getent ahostsv4 $1); then
|
if ip=$(getent ahostsv4 $1); then
|
||||||
echo $ip | grep STREAM | '{ print $1 ; exit }'
|
echo $ip | grep STREAM | awk '{ print $1 ; exit }'
|
||||||
else
|
else
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue