in reply to Re: Need help in data processing
in thread Need help in data processing
Hi achak01,
This might work for you
#!/usr/bin/perl use strict; while(<DATA>){ if (m/^Script.+\sat\s(.+)\s(.+)$/){ my $date = $1; my $time = $2; print "$date\t$time\n"; } } __DATA__ Script /opt/OV/bin/OpC/agtinstall/inst.sh invoked by root at 02/25/11 +14:36:48 blah blah blah Script /opt/OV/bin/OpC/agtinstall/inst.sh invoked by root at 02/25/11 +14:36:48 blah blah blah
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need help in data processing
by achak01 (Initiate) on Feb 26, 2011 at 13:09 UTC | |
by richardwfrancis (Beadle) on Feb 27, 2011 at 06:47 UTC |