diff --git a/helpers/funcs b/helpers/funcs index e8f35ef..4b65df6 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -369,6 +369,10 @@ local_latlon(){ get_dist(){ shift local given_ip="$1" + if [[ ! -f $_cache_coords ]]; then + printf "Unknown" + return + fi readarray -t coords < "$_cache_coords" readarray -t n < <(<<< "$given_ip" awk 'BEGIN{RS="."}{$1=$1}1')