diff options
author | root <root@krebs> | 2011-09-09 18:20:34 +0200 |
---|---|---|
committer | root <root@krebs> | 2011-09-09 18:20:34 +0200 |
commit | 176c9ac08ad9c2ddc430b2d1a194f6be41115f5b (patch) | |
tree | 82ea214ff1d45799099576e4ff007c34a6b7c990 /retiolum/bin/hosts | |
parent | dac9eb2553987778500e0bc7e54ad2a28124969d (diff) | |
parent | 150ce5757d2982da740bd9ce2b44b57b6d2831c6 (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'retiolum/bin/hosts')
-rwxr-xr-x | retiolum/bin/hosts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/retiolum/bin/hosts b/retiolum/bin/hosts index 6939f52c..bd0c77dc 100755 --- a/retiolum/bin/hosts +++ b/retiolum/bin/hosts @@ -6,6 +6,8 @@ netname=${1-retiolum} cd /etc/tinc/$netname/hosts for i in `ls`; do - sed -rn 's|^ *Subnet *= *([^ /]*)(/[0-9]*)? *$|\1\t'$i' '$i'.'$netname'|p' $i + sed -n ' + s|^ *Subnet *= *\([^ /]*\)\(/[0-9]*\)\? *$|\1\t'$i' '$i'.'$netname'|p + ' $i done | sort |