#! /bin/sh # getrrcnxml # get the Telmax21 Directory export XML file # from the intermediate RRCN sftp server xmlfile="$1" # if no file specified, get todays if [ -z "$xfile" ]; then #echo "getrrcnxml [filename]" #exit 1 YYYYMMDD=`date +"%Y%m%d"` xmlfile="RRRCN_XML_${YYYYMMDD}.xml" echo "xmlfile=[$xmlfile]" fi expect <" send "get $xmlfile\r" expect "sftp>" send "ls -altr\r" expect "sftp>" send "quit\r" expect eof END_EXPECT exit 0