Correct parsing of geoiplookup parsing for country with multiple words. - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit e7ee8fbf426b5c199e8a739079cbe60b58794727 DIR parent 0dd6e338e5a40ac7c476cf09147cae25755137a6 HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Sat, 14 Nov 2020 15:55:13 +0100 Correct parsing of geoiplookup parsing for country with multiple words. Diffstat: M locate-cake-hater | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/locate-cake-hater b/locate-cake-hater @@ -7,11 +7,11 @@ port="$2" case "$ip" in *:*) - country="$(geoiplookup6 "$ip" | awk '{print $NF}')" + country="$(geoiplookup6 "$ip" | sed 's:.*, ::')" ip="[$ip]" ;; *) - country="$(geoiplookup "$ip" | awk '{print $NF}')" + country="$(geoiplookup "$ip" | sed 's:.*, ::')" ;; esac