ipset -N %country% hash:net
wget -P . http://www.ipdeny.com/ipblocks/data/countries/%country%.zone
for i in $(cat /etc/%country%.zone ); do ipset -A %country% $i; done
iptables -P INPUT DROP
iptables -A INPUT -p tcp -m set --match-set %country% src -j ACCEPT
#!/bin/bash
AAA="First_word@First_line\nSecond_word@Second_line\nThird_word@Third_line"
echo -e "${AAA}" | while read line; do
if [ "$1" == "${line%@*}" ]; then
echo "Second part of the line: ${line#*@}"
fi
done