Skip to content

Commit

Permalink
log.dpkg.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
eexpress committed Aug 6, 2014
1 parent 8da01c1 commit 6e9395c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions log.dpkg.pl
@@ -0,0 +1,17 @@
#!/usr/bin/perl

my $Bred="\e[1;31m"; my $Bblue="\e[1;34m"; my $normal="\e[0m";
$log='/var/log/dpkg.log';
$re='\d\s(install|remove)';

open IN,$log.".1"; @_=grep /$re/,<IN>; close IN;
open IN,$log; @tmp=grep /$re/,<IN>; close IN;
push @_,@tmp;
#print @_;
for(@_){
s/(install|remove)\s[^:]*\K\:.*//;
s/install/$Bblue$&/g;
s/remove/$Bred$&/g;
s/$/$normal/;
print;
}

0 comments on commit 6e9395c

Please sign in to comment.