summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetwork-topology-scanner8
1 files changed, 7 insertions, 1 deletions
diff --git a/network-topology-scanner b/network-topology-scanner
index a57c555..d2929be 100755
--- a/network-topology-scanner
+++ b/network-topology-scanner
@@ -66,9 +66,15 @@ while read -r version address; do
base_address=$(
sipcalc "${address}" | \
sed '
- s/^Network\s\+address\s\+-\s\+\(\S\+\)\s*$/\1/
+ s/^Network address\s\+- \+\(\S\+\)\s*$/\1/
+ t
+ s/^Network mask (bits)\s\+- \+\([0-9]\+\)\s*$/\1/
t
d
+ ' | \
+ sed '
+ N
+ s,\n,/,
'
)
;;