[TriLUG] OT: Need a thinkpad power supply
Scott Lundgren
trilug at capitalfellow.com
Wed Aug 24 10:26:32 EDT 2005
> Nasty fun with perl, just counting lines to get a good guess:
> $ mkdir joyner
> $ wget -nd -nH -P joyner -r -l 1 -A gz \
> -X Week-of http://www.trilug.org/pipermail/trilug/
> $ gunzip -c joyner/*gz >trilug.txt
> $ perl -n -e 'if( /^From: / ){ if($count){print "$count\n";$count=0}
> if(/joyner/){$joyner=1;}else{$joyner=0} }else{if($joyner){ if(/^Date:
> /||/^Subject:/){print;} if(!/^>/&&/[a-zA-Z]/){$count++;}} }'
> trilug.txt |perl -n -e 'chomp; if(/^Date/)
> {$d=$_;}else{if(/^Sub/){$s=$_;}else{print "$_ $d $s\n";}}'|sort -n -k1
>
Tim,
great hack of a solution, just glancing over this I get the gist of
what you're doing but I know I & maybe some others were like a more
detailed explanation. The myriad switches to wget and why they were
used I can look up but will you break down the regular expressions
after the else{if($joyner) ?
- SL
More information about the TriLUG
mailing list