in reply to Re: Parsing a text file to get the location of the latest
in thread Parsing a text file to get the location of the latest
Note1 - the Date compare logic is very weak - it simply does a textual compare.perl -000 -ne '($l,$d)=m/Location:\s+(\S+).+BuildDate:\s+(\d.+\d)/s; ( +$lm,$ld)=($l,$d) if $d gt $ld and m/Approved/s}{print qq|$lm\n|' YOUR +-FILE-NAME.txt
Update: Oops - I had intended to respond to the original post - but got OGB's post instead. Sorry.
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius
|
|---|