LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2011, 10:02 AM   #1
daredevil_1981
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Rep: Reputation: Disabled
Issue in FTP server readiness check


hi friends,

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.

server=172.0.1.114
echo '$server - ' $server

if $(ftp -niv $server <<-EOF^JEOF | /bin/grep -qi "Connected to" ) ||
$(ftp -niv $server <<-EOF^JEOF | /bin/grep -qi "server ready" )
then
echo "server is ready "
./ftp.sh
else
echo "server is not connected "
fi

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,
MSK
 
Old 10-17-2011, 06:27 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
AFAIK "here" documents are supposed to have their content spread over multiple lines and not one-liners?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP server issue DD554 Linux - Networking 1 06-02-2010 07:45 PM
How to check free space on ftp server? lighthousekeeper Linux - Networking 1 04-21-2009 11:53 AM
LXer: Companies urged to check IE7 readiness LXer Syndicated Linux News 0 10-13-2006 08:54 PM
ftp server issue Kumado Linux - Networking 4 09-16-2005 12:25 AM
FTP Server Config Issue blainehilton Linux - Software 3 07-05-2005 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration