<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FTP script not complete in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617772#M885448</link>
    <description>Hi Jeff:&lt;BR /&gt;&lt;BR /&gt;Change the line 'ftp' to 'ftp -i -n'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 20 Nov 2001 18:40:11 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-11-20T18:40:11Z</dc:date>
    <item>
      <title>FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617770#M885443</link>
      <description>Hello, I am new but learning to write shell scripts- thanks for any help. Attatched is my script that attempts to ftp a file from server1 to server2.  When it is run, the 'ftp' command runs, but on the screen it enters 'ftp' mode and waits for my manual input- instead of the scripts entering the rest of the commands.  Any help is greatly appreciated.  Jeff</description>
      <pubDate>Tue, 20 Nov 2001 18:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617770#M885443</guid>
      <dc:creator>Jeff Daigle</dc:creator>
      <dc:date>2001-11-20T18:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617771#M885446</link>
      <description>Hi Jeff:&lt;BR /&gt;&lt;BR /&gt;When I have to do ftp scripting these days, I use perl with the Net::FTP module (available for download at &lt;A href="http://www.perl.org/CPAN)." target="_blank"&gt;www.perl.org/CPAN).&lt;/A&gt; It really makes FTP operations very simple. Any error conditions and timeouts are easy to test for and set.&lt;BR /&gt;&lt;BR /&gt;It's usually something as simple as this (with error checking omitted): &lt;BR /&gt;&lt;BR /&gt;use Net::FTP; &lt;BR /&gt;&lt;BR /&gt;$ftp = Net::FTP-&amp;gt;new("remotehost.name", Debug =&amp;gt; 0); &lt;BR /&gt;$ftp-&amp;gt;login("anonymous",'cstephen@abc.com'); &lt;BR /&gt;$ftp-&amp;gt;cwd("/downloads"); &lt;BR /&gt;$ftp-&amp;gt;get("testfile.txt"); &lt;BR /&gt;$ftp-&amp;gt;quit; &lt;BR /&gt;&lt;BR /&gt;Believe me, I used to do it in script but this is much cleaner.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2001 18:23:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617771#M885446</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-11-20T18:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617772#M885448</link>
      <description>Hi Jeff:&lt;BR /&gt;&lt;BR /&gt;Change the line 'ftp' to 'ftp -i -n'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 20 Nov 2001 18:40:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617772#M885448</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-11-20T18:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617773#M885449</link>
      <description>Hi Jeff,&lt;BR /&gt;&lt;BR /&gt;  Corrected ur script:&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;#!/usr/bin/sh                                                &lt;BR /&gt;&lt;BR /&gt;REMOTE=111.222.333.444 &lt;BR /&gt;USER=user123                                              &lt;BR /&gt;PW=password123                                           &lt;BR /&gt;DIR=/directory                                &lt;BR /&gt;FILE=*.jef                                               &lt;BR /&gt;                                                             &lt;BR /&gt;echo "### Transferring the files from server1 to server2 ###"      &lt;BR /&gt;ftp -n $REMOTE &amp;lt;&amp;lt; EOF                                                        &lt;BR /&gt;user $USER $PW                                               &lt;BR /&gt;cd $DIR                                                      &lt;BR /&gt;mput $FILE                                                    &lt;BR /&gt;bye&lt;BR /&gt;EOF&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;BR /&gt;Cheers...&lt;BR /&gt;Satish</description>
      <pubDate>Tue, 20 Nov 2001 18:40:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617773#M885449</guid>
      <dc:creator>Satish Y</dc:creator>
      <dc:date>2001-11-20T18:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617774#M885450</link>
      <description>You just need to use command line redirection in your original script (also called a "here document").&lt;BR /&gt;&lt;BR /&gt;ftp &amp;lt;&amp;lt; END&lt;BR /&gt;open . . .&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;I would suggest using a .netrc file, though, in cases where you are not logging in as "anonymous" or "ftp"</description>
      <pubDate>Tue, 20 Nov 2001 18:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617774#M885450</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2001-11-20T18:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617775#M885451</link>
      <description>Jeff, ftp is interactive (unlike tftp) and so it requires interactive user commands.  A work around is to have you script write all the ftp commands to a temporary file and then use that file as input to ftp.  Here is an example...&lt;BR /&gt;&lt;BR /&gt;echo "binary" &amp;gt; /tmp/pos_ftp.$$ &lt;BR /&gt;echo "put $jcl_file" &amp;gt;&amp;gt; /tmp/pos_ftp.$$&lt;BR /&gt;echo "quit" &amp;gt;&amp;gt; /tmp/pos_ftp.$$&lt;BR /&gt;ftp $HOST &amp;lt; /tmp/pos_ftp.$$&lt;BR /&gt;&lt;BR /&gt;The .netrc file in the home directory of the user doing the ftp would specify the host and also the authentication information. If your concerned about the security issue then this would not be good for you because the password is plain text.&lt;BR /&gt;&lt;BR /&gt;Do a man on .netrc for more info.&lt;BR /&gt;&lt;BR /&gt;Tony&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2001 18:49:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617775#M885451</guid>
      <dc:creator>Anthony deRito</dc:creator>
      <dc:date>2001-11-20T18:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script not complete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617776#M885452</link>
      <description>Hi Jeff,&lt;BR /&gt;&lt;BR /&gt;Use this,&lt;BR /&gt;&lt;BR /&gt;REMOTE=111.222.333 (remote server's IP address)                                       &lt;BR /&gt;USER=user123                                              &lt;BR /&gt;PW=password123                                           &lt;BR /&gt;DIR=/directory                                &lt;BR /&gt;FILE=*.jef                                               &lt;BR /&gt;                                                             &lt;BR /&gt;echo "### Transferring the files from server1 to server2 ###"      &lt;BR /&gt;ftp -n $REMOTE &amp;lt;&lt;ENDFTP&gt;&lt;/ENDFTP&gt;user $USER $PW                                               &lt;BR /&gt;cd $DIR                                                      &lt;BR /&gt;bin&lt;BR /&gt;mput $FILE                                                    &lt;BR /&gt;EndFTP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2001 19:09:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-not-complete/m-p/2617776#M885452</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-11-20T19:09:20Z</dc:date>
    </item>
  </channel>
</rss>

