summaryrefslogtreecommitdiffstats
path: root/retiolum/bin
diff options
context:
space:
mode:
authortv <tv@xso>2011-09-09 15:55:05 +0200
committertv <tv@xso>2011-09-09 15:55:05 +0200
commit9d16807a67b40648095b15edf59fb7d601b9b079 (patch)
tree96cb94662c5f9ad6a3e070c5f2c80a1b567c6ac5 /retiolum/bin
parent630c7d80d48d0ebfe30c2a84d8b887e6b029bc83 (diff)
//retiolum/bin/hosts: use BRE @sed
Diffstat (limited to 'retiolum/bin')
-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