Issue in FTP server readiness check
i have to check the ftp server is ready for for transfer or not .
i am using the below script to know whether the ftp server is ready or not.
echo '$server - ' $server
if $(ftp -niv $server <<-EOF^JEOF | /bin/grep -qi "Connected to" ) ||
$(ftp -niv $server <<-EOF^JEOF | /bin/grep -qi "server ready" )
echo "server is ready "
echo "server is not connected "
i got an error while executing the script
./sample.sh: line 4: syntax error at line 6: `<<' unmatched
please help me to sort it out .
Thanks in advance,