summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-01-10 19:49:35 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-10 19:49:35 +0100
commit14648df7aca57da48999c7c6ae601d4edab0a0df (patch)
tree13649b74ed30f25a0cbc5bf4c2376c01f3686c9f
parent079f520913487f557070859b6be2cb484e8441fd (diff)
downloadnet_if-14648df7aca57da48999c7c6ae601d4edab0a0df.tar.gz
net_if-14648df7aca57da48999c7c6ae601d4edab0a0df.tar.bz2
net_if-14648df7aca57da48999c7c6ae601d4edab0a0df.zip
regex should be match the start of the line
-rwxr-xr-xnet_if2
1 files changed, 1 insertions, 1 deletions
diff --git a/net_if b/net_if
index 09a5b91..2d4af93 100755
--- a/net_if
+++ b/net_if
@@ -39,7 +39,7 @@ sub get_if_status {
}
while (<IFCONFIG>) {
- if ($_ =~ m/$if: flags=([0-9]+)</) {
+ if ($_ =~ m/^$if: flags=([0-9]+)</) {
if ($1 & 1) {
push(@up, $if);
}