#!/usr/bin/perl

my $hostname = `hostname`;

($suffix, $rest) = $hostname =~ m/d-(\d+)\.cs\.wisc\.edu/;

#$realsuffix = sprintf "%02d", $suffix;
print "$suffix\n";
my $realsuffix = $suffix + 0;
printf "real suffix is $realsuffix\n";

my $cmd = "/unsup/hadoop-0.16.0/src/hadoop-0.16.0/bin/hadoop fs -copyFromLocal /scratch/tpch_data/1000/lineitem.tbl." . $realsuffix . " /user/epaulson/tpch-input/lineitem.tbl." . $realsuffix;

print "I'm going to run $cmd\n";
`$cmd`
