summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xretiolum/bin/hosts4
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