#! /usr/bin/awk -f # Add default IPv6 route to the output of sipcalc(1) # Copyright (C) 2009 Matous Jan Fialka, # Released under the terms of The MIT License # # Usage: sipcalc [/] | sipcalc-6adr.awk # This script is specific for the company I work! /^Network range/ { route = $4 } ! $1 { if (seen_blank) next seen_blank = 1 } /^-$/ { print "Default route\t\t- " substr(route, 1, length(route) - 1) "1\n" } { print }