/usr/bin/rfnmz is in namazu2-index-tools 2.0.21-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #! /usr/bin/perl -w
#
# -*- Perl -*-
#
# rfnmz - Reindex NMZ.field.* files.
#
# Copyright (C) 2000 Namazu Project All rights reserved.
# This is free software with ABSOLUTELY NO WARRANTY.
#
use strict;
use FileHandle;
die "usage: rfnmz <index>\n" if @ARGV == 0;
my $target = $ARGV[0];
die "invalid target: $target\n" unless -d $target;
chdir $target;
my @fields = grep {! /\.i$/} glob 'NMZ.field.*';
for my $field (@fields) {
my $fh_in = new FileHandle;
$fh_in->open($field) || die "$field: $!";
binmode($fh_in);
my $fh_out = new FileHandle;
$fh_out->open(">$field.i") || die "$field: $!";
binmode($fh_out);
my $ptr = 0;
while (<$fh_in>) {
print $fh_out pack 'N', $ptr;
$ptr += length;
}
}
|