On 3/16/06, Zembower, Kevin <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED]:~/rrdmonitoring$ cat /proc/net/dev|perl -ne
> '/eth0:(\d+)\s+.*/; print $1;'

The -n flag means you're running that code in a loop. Every time
through the loop, you're printing $1, even if the pattern didn't
match.

Somebody else will have to give you the Useless Use of cat award. I
haven't seen one of those in years. :-)

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to