Created
October 4, 2010 12:00
-
-
Save anonymous/609592 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
$| = 1; | |
while (<>) { | |
chomp(); | |
if( ! -f "/var/www/mediacas/$_" ){ | |
print "$_\n"; | |
}else{ | |
open(KEYFILE, "/var/www/mediacas/$_") || die "cannot open file for reading @!"; | |
my $line=<KEYFILE>; | |
close(KEYFILE); | |
if($line=~m/^([0-9a-f]+)/){ | |
print "hashes/$1\n"; | |
}else{ | |
#s|^.*|mediacas/incoming/test/test2.jpg|; | |
print "$_\n"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment