jasonwolf has asked for the wisdom of the Perl Monks concerning the following question:
I am currently working on a simple BASH script for a Nagios plug-in; however, BASH does not do floating point integer, so I wanted to use this time for Perl.
BASH code
poltx=$( snmpget -v 2c -c readonly 192.168.1.23 IF-MIB::ifInOctets.5001 | awk {'print $4'})
I am able to wrap cli commands in `command`, so I can wrap commands; however, I am a little lost at the awk portion. I have reviewed a number of forums; however, I am still lost, and wanted to communicate with someone to ask questions on how I can do this as easiest possible, so I can learn at the same time.
Thank you JW
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple awk feature in perl
by Corion (Patriarch) on Feb 24, 2015 at 17:08 UTC | |
|
Re: simple awk feature in perl
by VinsWorldcom (Prior) on Feb 24, 2015 at 17:17 UTC | |
by FreeBeerReekingMonk (Deacon) on Feb 24, 2015 at 18:27 UTC | |
|
Re: simple awk feature in perl
by GotToBTru (Prior) on Feb 24, 2015 at 17:05 UTC | |
|
Re: simple awk feature in perl
by jasonwolf (Sexton) on Feb 24, 2015 at 19:08 UTC |