Faça algo assim
server=$(cat /etc/openvpn/anonvpn.conf |grep remote|cut -d" " -f2)
nextserver=$(grep -A1 $server /etc/openvpn/list.txt|grep -v $server)
if [ -z "$nextserver" ]; then
nextserver=$(head -n1 /etc/openvpn/list.txt)
fi
sed -i "s!$server!$nextserver!" /etc/openvpn/anonvpn.conf
crie o arquivo /etc/openvpn/list.txt com sua lista de servidores