projects
/
grml-live.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Some cleanups in /linuxrc
[grml-live.git]
/
rewrite
/
clean_dpkg_status
1
#!/usr/bin/perl
2
3
use warnings;
4
use strict;
5
6
my $filename='/var/lib/dpkg/status';
7
8
open FILE, $filename or
9
die "Failed to open $filename\n";
10
11
while (my $line=<FILE>) {
12
13
chomp($line);
14
my @section=();
15
16
while ($line ne "") {
17
push(@section,$line);
18
$line=<FILE>;
19
chomp($line);
20
}
21
22
if ($section[1] ne 'Status: purge ok not-installed') {
23
24
foreach (@section) {
25
$_ = $_ . "\n";
26
print;
27
}
28
29
print"\n";
30
}
31
}