#!/usr/bin/awk -f

# Comments and questions to: sven-ola@gmx.de

BEGIN {
  DEBUG = 0;
  while("ip route"|getline) {
    if ("metric" == $(NF-1) && 0 < $(NF)) {
      cmd = "ip route del "$0
      if (DEBUG) print cmd;
      system(cmd);
    }
  }
}
