manav_gupta has asked for the wisdom of the Perl Monks concerning the following question:
I have a bunch of files in a folder with data like so:
I need to get that number "39035", and I've been tinkering with a one-liner (though yeah, I'm a rusty-newbie), and the following doesn't work for me:+--------------------------------------------------------------------- +----------------------------+ | Total SE In Database + +--------------------------------------------------------------------- +----------------------------+ + Total SE Database + ----------------- + 44835 + +--------------------------------------------------------------------- +----------------------------+ | Total SE ON + +--------------------------------------------------------------------- +----------------------------+ + Total SE ON + ----------- + 39035 + +--------------------------------------------------------------------- +----------------------------+ | Total SE ON For SNMP + +--------------------------------------------------------------------- +----------------------------+
Any suggestions Gurus?perl -ne 'if (m/^Total SE ON.*(\d+)/s) {print "$1\n"}' *
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: One liner
by ikegami (Patriarch) on Jun 02, 2009 at 15:14 UTC | |
by manav_gupta (Acolyte) on Jun 02, 2009 at 15:24 UTC | |
by ikegami (Patriarch) on Jun 02, 2009 at 15:28 UTC | |
Re: One liner
by Roy Johnson (Monsignor) on Jun 02, 2009 at 15:21 UTC | |
Re: One liner
by AnomalousMonk (Archbishop) on Jun 02, 2009 at 19:00 UTC |
Back to
Seekers of Perl Wisdom