Re: noffle-newgroups -- show new groups added in the last $1 days

Carles Arjona <[email protected]> Thu, 16 Oct 2003 19:40:03 +0200
Newsgroups gmane.network.noffle.user
Message-ID <[email protected]>
Dan Jacobson wrote:
>
<>
> echo Newsgroups added in the last ${1?} days:
> noffle -g|perl -wlane '
> use Date::Parse;
> BEGIN{$now=str2time();}
> my $then = str2time($F[6]);
> if (($now-$then)/3600/24 <= '${1?}'){print $F[6], " ", $F[0]}
> '|sort -k 2
> #P.S. perhaps in anacrontab try e.g.
> #11 22 noffnew /home/you/bin/noffle-newgroups 13
> 
> After someone tells me how to make this a non-embarrassing pure perl
> script, I will put it on my website.


 echo Newsgroups added in the last ${1?} days:
 noffle -g | awk -v d=$(date +%Y-%m-%d -d"$1 days ago") \
   '{if ($7 >= d) print $1" "$7}' | sort -k 2

do work as well.

Regards,
Carles Arjona




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php