#!/usr/bin/perl -w # nerxscode # changes CTIME of nerxsdata. # 2001-11-03 nik@nerxs.com use POSIX qw{strftime}; if ($ARGV[0]) { $path = $ARGV[0]; } else { print "Usage: nerxs.pl [DIR].\n"; exit; } @files = `/home/nik/makenerxs/Tools/find.pl $path`; $u = 0; foreach $file (@files) { open(URL, "/home/nik/makenerxs/Tools/grabber.pl $file |") or die "Forking Error: $!\n"; while() { if ($_ ne "\n" || $_ ne "") { push(@urls, $_); chomp($urls[$u++]); } } close (URL); } foreach $file (@files) { chomp($file); } for $l (0 ... $#files) { open(FH, "< $files[$l]") or die "could not open $file: $!."; open(TEMP, "+> $files[$l].tmp") or die "could not open $file: $!."; print "Reading $files[$l]...\n"; while() { foreach ($_) { ($key, $val) = /^(\w+):\s*(.*)$/; $site{$key} = $val; if ($key eq "CTIME") { $site{$key} =~ s/://g; $site{$key} =~ s/\s//g; $site{$key} =~ s/-//g; $site{$key} =~ s/[a-z|A-Z]//g; } print TEMP "$key:\t$site{$key}\n"; } } close (FH); close (TEMP); system("mv $files[$l].tmp $files[$l]"); }