diff options
author | tv <tv@xso> | 2011-09-09 15:55:05 +0200 |
---|---|---|
committer | tv <tv@xso> | 2011-09-09 15:55:05 +0200 |
commit | 9d16807a67b40648095b15edf59fb7d601b9b079 (patch) | |
tree | 96cb94662c5f9ad6a3e070c5f2c80a1b567c6ac5 /retiolum/bin/hosts | |
parent | 630c7d80d48d0ebfe30c2a84d8b887e6b029bc83 (diff) |
//retiolum/bin/hosts: use BRE @sed
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 |