This is my sample code but it's not working getting invalid command error in stat command, the connection is successful but stat command is not working. stat command is installed in both servers local and remote. Thanks in Advance.
#!/bin/bash
host=--
user=--
pass=--
ftp -inv $host <<EOF
user $user $pass
cd /desktop/suman
dst_file="suman.txt"
filetime=$(stat -c %Y "${dst_file}")
echo filetime
bye
EOF
#!/bin/bash
host=--
user=--
pass=--
ftp -inv $host <<EOF
user $user $pass
cd /desktop/suman
dst_file="suman.txt"
filetime=$(stat -c %Y "${dst_file}")
echo filetime
bye
EOF