Need help in ftp in Shell script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manjuks
    New Member
    • Dec 2007
    • 72

    Need help in ftp in Shell script

    Hi All,

    I am facing problem in ftp. I am porting code from Solaris to MV Linux, ftp behaves differently in both.

    script is in shell

    Code:
    if [[ "${OSname}" = "Linux" ]] ; then
            print "= ftp -n -i ${FtpMachine}" >> ${Log}
            ftp -n -i ${FtpMachine} <<-EOF >> ${Log} 2>&1
            user ${Login} ${Password}
            ...............
    else
            print "= ftp -n -i ${FtpMachine}" >> ${Log}
            [B]ftp -n -i ${FtpMachine} <<-EOF >> ${Log} 2>&1[/B]
            user ${Login} ${Password}
            ...............
    The problem its not working, the program is not transferring the files. If I comment the bold one, It will work fine. I do not know why it is behaving so. Can any body please help to resolove this issue.

    Thanks in advance
    Last edited by numberwhun; Dec 24 '10, 04:06 PM. Reason: Please use code tags!
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    First, you really need to pay attention to the topic of your question and choose a more appropriate forum. You have posted a question about shell scripting in the Perl forum.

    I will move this to the better suited forum. Next time, please be more mindful! Seeing that you have 70 posts on this site, it is highly expected that you would have known to do this.

    Regards,

    Jeff

    Comment

    Working...