ctlinnd renumber '' catch 22

David L. Nicol david at kasey.umkc.edu
Tue Apr 24 03:39:16 UTC 2001

Karl Kleinpaste wrote:
> ought to perlify this, but I Don't Do Perl [much].)  Finally, restart
> INN so that it doesn't get the -r flag.

here you go...

#!/usr/bin/perl -n

	($gr,$hi,$lo,$md) = split;
	( $d = $gr ) =~ tr#\.#/#;
	opendir DIR, $d;
	@list = sort (grep /^\d+$/, (DIR));
        $last=shift @list;
        printf "%s %010d %010d %s\n", $gr, $last, $lo, $md;


                      David Nicol 816.235.1187 dnicol at cstp.umkc.edu
                                    "Described as awesome by users"

More information about the inn-workers mailing list