I am trying to move files from one location to another on the remote server using sftp below:
for i in a b c d
do
sftp $REMUSR <<EOM>>$OUT 2>&1
rename $SOURDIR/sample_${i}_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].gz $REMDIR
quit
EOM
:
:
done
but i get the message
Couldn't rename file "/source/sample_a_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].gz" to "/destin/": No such file or directory
though this file exists under the /source directory which i verified:
ls -l sample_a_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].gz
-rw-r--r-- 1 prd admin 112 May 23 09:16 sample_a_20140330.gz
Pls help