1 2 3 4 5 6 7 8 9 10 11
#! /bin/sh set -euf netname=${1-retiolum} cd /etc/tinc/$netname/hosts for i in `ls`; do sed -rn 's|^ *Subnet *= *([^ ]*) *$|\1\t'$i' '$i'.'$netname'|p' $i done