Re: Package of non-development scripts?
On Wed, Jul 18, 2001 at 03:01:25PM +0200, Filip Van Raemdonck wrote:
> On Tue, Jul 17, 2001 at 05:01:08PM +0200, Joost Kooij wrote:
> > On Tue, Jul 17, 2001 at 05:39:37AM -0400, Matt Zimmerman wrote:
> > >
> > > grep-status -nsInstalled-size,Package -F Status ' installed' \
> > > | perl -p00l12 -e 's/\n/ /' \
> > > | sort -rn
> >
> > All perl (faster) one-liner (pythonistas enjoy/shudder):
> ^^^^^^^
> >
> > perl -00 -e 'map {printf"%-24s%10d\n",@$_}(sort{$a->[1]<=>$b->[1]}grep{@$_}
> > map{%s=(/^(\S{3})\S+:\s+(.+)$/mg);($s{Sta}=~/ i\S+d$/)?($t+=$s{Ins},
> > [$s{Pac},$s{Ins}]):0;}<>),["total",$t]' /var/lib/dpkg/status
>
> Faster? Don't think so...
Hmm, it appears that even the perl lexer doesn't like my code. ;-)
Cheers,
Joost
Reply to: