#!/usr/bin/perl # # Limpia el routing cache de ser necesario # $PATH_IP="/bin/ip"; my @routels=`$PATH_IP route ls`; for (@routels) { chop($_); if ( $_=~/dead/ ) { system("$PATH_IP route flush cache"); print "done\n"; } }