<?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. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020817#M299976</link>
    <description>Oops.  I missed the "to".  Wget is useful if&lt;BR /&gt;you're trying to pull the files in, not push&lt;BR /&gt;them out.  (There is a "wput" program out&lt;BR /&gt;there somewhere to go the other way, but I&lt;BR /&gt;don't know much about it.)</description>
    <pubDate>Fri, 15 Jun 2007 08:57:39 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2007-06-15T08:57:39Z</dc:date>
    <item>
      <title>FTP script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020814#M299973</link>
      <description>I want to automate ftp of some file to ftp.host.com (say) with user dummyuser &amp;amp; password dummypass.&lt;BR /&gt;Files are stored in say /interfaces/sid/send &amp;amp; i want to copy them to target's same directory.&lt;BR /&gt;&lt;BR /&gt;Can anybody help?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Vishal</description>
      <pubDate>Fri, 15 Jun 2007 06:13:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020814#M299973</guid>
      <dc:creator>Vishal Ranjan</dc:creator>
      <dc:date>2007-06-15T06:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020815#M299974</link>
      <description>#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;ftp -in &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;open remoteserver.yourcompany.org&lt;BR /&gt;user dummyuser dummypass&lt;BR /&gt;ascii&lt;BR /&gt;cd /interfaces/sid/send&lt;BR /&gt;lcd /interfaces/sid/send&lt;BR /&gt;mput *&lt;BR /&gt;bye&lt;BR /&gt;EOF&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Jun 2007 06:26:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020815#M299974</guid>
      <dc:creator>Bernd Reize</dc:creator>
      <dc:date>2007-06-15T06:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020816#M299975</link>
      <description>Or, something like:&lt;BR /&gt;&lt;BR /&gt;wget 'ftp://dummyuser:dummypass@ftp.host.com//interfaces/sid/send/*'&lt;BR /&gt;&lt;BR /&gt;The wisdom of storing a password in a script&lt;BR /&gt;is, as always, open to question.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/wget/wget.html" target="_blank"&gt;http://www.gnu.org/software/wget/wget.html&lt;/A&gt;</description>
      <pubDate>Fri, 15 Jun 2007 08:52:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020816#M299975</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-06-15T08:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020817#M299976</link>
      <description>Oops.  I missed the "to".  Wget is useful if&lt;BR /&gt;you're trying to pull the files in, not push&lt;BR /&gt;them out.  (There is a "wput" program out&lt;BR /&gt;there somewhere to go the other way, but I&lt;BR /&gt;don't know much about it.)</description>
      <pubDate>Fri, 15 Jun 2007 08:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020817#M299976</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-06-15T08:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020818#M299977</link>
      <description>I really cringe when I see someone list a string of ftp commands with nary a thought given to error checking. This is simply unacceptable in a production environment.&lt;BR /&gt;&lt;BR /&gt;Fortunately, it's trivially easy to do full-blown error checking with Perl's Net::FTP module. The attached Perl script will do everything you need and you don't even have to know any Perl. All you have to do is check the status of the command itself and if it is zero then all was well.&lt;BR /&gt;&lt;BR /&gt;For your specific problem:&lt;BR /&gt;&lt;BR /&gt;typeset -i STAT=0&lt;BR /&gt;cd /interfaces/sid/send&lt;BR /&gt;ftpput.pl -h target -l dummyuser -p dummypass -d /interfaces/sid/send -B -t 3 myfile1 myfile2 myfile3&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -ne 0 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "FTP Xfer failed; status ${STAT}" &amp;gt;&amp;amp;2&lt;BR /&gt;  fi&lt;BR /&gt;exit ${STAT}&lt;BR /&gt; &lt;BR /&gt;----------------------------------------&lt;BR /&gt;This would ftp to host target, login as dummyuser, cd to /interface/sid/send, set binary mode, allow for up to 3 retries (-t 3), and then put myfile, myfile2, and myfile3. You don't even have to pass the password on the command line because you can use a .netrc file -- just like real FTP.&lt;BR /&gt;&lt;BR /&gt;Invoke as ftpput.pl -u for full usage. There is also a secure FTP version.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Jun 2007 09:36:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020818#M299977</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-06-15T09:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: FTP script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020819#M299978</link>
      <description>The below will give you a verbose output of the ftp session.&lt;BR /&gt;&lt;BR /&gt;# cat /var/tmp/ftpsct&lt;BR /&gt;/usr/bin/ftp -v -n &amp;gt; /var/tmp/ftpsct.log 2&amp;gt; /var/tmp/ftpsct.err &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;open servername.domain&lt;BR /&gt;user name password&lt;BR /&gt;prompt&lt;BR /&gt;cd /ddir&lt;BR /&gt;bin&lt;BR /&gt;mput file*&lt;BR /&gt;ls /tmp &lt;BR /&gt;quit&lt;BR /&gt;EOF &lt;BR /&gt;&lt;BR /&gt;Replace the username/pw,destination system, dir, etc.&lt;BR /&gt;&lt;BR /&gt;sh /tmp/ftpsct (run the script)&lt;BR /&gt;after that you can verify /var/tmp/ftpsct.err &amp;amp; ftpsct.log files.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rasheed Tamton.</description>
      <pubDate>Sat, 16 Jun 2007 00:38:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/4020819#M299978</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-06-16T00:38:38Z</dc:date>
    </item>
  </channel>
</rss>

