I want to move more than 1K files from one server to another but just 29 files were copied and can not copy the reset and its same when I am using the SCP #scripts for backup#sripts prepared by dhafer abudarag86348@gmail.com#!/bin/bashdate=$(date +%Y%m)/usr/bin/expect<<EOF  cd /home/mdsp/lcftp/templc/sag/sa/run/sa/10.157.78.40  spawn  bash -c /usr/bin/scp *$date*.log root@10.157.78.143:/tmp/dhafer  expect Password:  send Zain@123\r  expect eofEOFand the #scripts for backup#sripts prepared by dhafer 0592996292 abudarag86348@gmail.com#!/bin/bashDATE=$(date +%Y%m)HOST=10.157.78.143PORT=22USER=rootPASSWORD=Zain@123SOURCE_FILE=/home/mdsp/lcftp/templc/sag/sa/run/sa/10.157.78.40/*$DATE*TARGET_DIR=/tmp/dhafer/usr/bin/expect<<EOD  spawn /usr/bin/sftp -o Port=$PORT $USER@$HOST  expect password:  send $PASSWORD\r  expect sftp>  send put $SOURCE_FILE $TARGET_DIR\r  expect sftp>  send bye\rCan you please help me to check?
can not copy more than 29 files to the target server using shell script
shell script;scp;sftp