rm -f INDEX.pl
echo "#!/usr/bin/expect -f" >> INDEX.pl
ls /home/publishing/www2.spacedaily.com/indexes/*200*.html | awk '{print "set timeout -1" "\n" "spawn scp -P 22 "$1 " 206.225.93.35:/var/www/vhosts/spacedaily.com/httpdocs/pageone/" "\n" "match_max 100000" "\n" "expect -exact \"root@206.225.93.35'"'"'s password: \"" "\n" "send -- \"0,sumitomo,0\\r\"" "\n" "expect eof"}' >> INDEX.pl
ls /home/publishing/www2.spacedaily.com/indexes/*200*.html | awk '{print "set timeout -1" "\n" "spawn scp -P 22 "$1 " 206.225.93.35:/var/www/vhosts/spacedaily.com/httpdocs/index.html" "\n" "match_max 100000" "\n" "expect -exact \"root@206.225.93.35'"'"'s password: \"" "\n" "send -- \"0,sumitomo,0\\r\"" "\n" "expect eof"}' >> INDEX.pl
chmod 755 INDEX.pl
