summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-11-14 16:18:28 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-11-14 16:18:28 -0800
commit018569a6e5783672db7763b0762afe194a585aa3 (patch)
tree933f4bb07abaff1b371e3b9290b64a04ddc59608 /scripts
parent40f55b9e218389800c0dab50b50c9cd8ae0dcfe6 (diff)
downloadvyatta-cfg-018569a6e5783672db7763b0762afe194a585aa3.tar.gz
vyatta-cfg-018569a6e5783672db7763b0762afe194a585aa3.zip
Use grep -c rather than running wc command
Grep already has a count option, so use it.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-interfaces.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index c8e23a8..43f5f96 100644
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -65,7 +65,7 @@ if (defined $op_dhclient) { op_dhcp_command($op_dhclient, $dev); }
sub is_ip_configured {
my ($intf, $ip) = @_;
- my $wc = `ip addr show $intf | grep $ip | wc -l`;
+ my $wc = `ip addr show $intf | grep -c $ip`;
if (defined $wc and $wc > 0) {
return 1;
} else {