, TLP. , , . while ( , ymmv, ..):
my $currentInFile = "";
my $currentOutFileHandle = "";
while if-else
if ($currentInFile ne $ARG) {
if (fileno($currentOutFileHandle)) {
if (!close($currentOutFileHandle)) {
}
}
my $newOutFile = $ARG . ".tagged";
if (!open($currentOutFileHandle, ">", $newOutFile)) {
}
}
if (...conditional from TLP...) {
$lastkey = $1 . " " . sprintf("%0.10d", $.);
}
if (fileno($currentOutFileHandle)) {
print $currentOutFileHandle $lastkey . "\t" . $line;
}
else {
}
foo.log.tagged foo.log, ; .tagged , "0xNNNNNNNN LLLLLLLLLL\t" (LLLLLLLLLLL → ), . sort(1) , --temporary-directory, , /tmp temp, , . - :
sort --output=/my/new/really.big.file --temporary-directory=/scratch/dir/on/roomy/partition *.tagged
:
perl -pi -e 's/^[^\t]+\t//' /my/new/really.big.file
FWIW, , , 10 2, - , .