rm -f JAPAN.pl
echo "#!/usr/bin/expect -f" >> JAPAN.pl
ls /home/publishing/news.japan.co.jp/indexes/*200*.html | awk '{print "set timeout -1" "\n" "spawn scp -P 1776 "$1 " 67.15.58.35:/netra/www/j/a/japan.co.jp/pageone/" "\n" "match_max 100000" "\n" "expect -exact \"root@67.15.58.35'"'"'s password: \"" "\n" "send -- \"0,sumitomo,0\\r\"" "\n" "expect eof"}' >> JAPAN.pl
ls /home/publishing/news.japan.co.jp/indexes/*200*.html | awk '{print "set timeout -1" "\n" "spawn scp -P 1776 "$1 " 67.15.58.35:/netra/www/j/a/japan.co.jp/index.php" "\n" "match_max 100000" "\n" "expect -exact \"root@67.15.58.35'"'"'s password: \"" "\n" "send -- \"0,sumitomo,0\\r\"" "\n" "expect eof"}' >> JAPAN.pl
chmod 755 JAPAN.pl
./JAPAN.pl 
