<?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 Script for ftp in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693153#M842844</link>
    <description>I am looking for a script which can do:&lt;BR /&gt;&lt;BR /&gt;Working on the unix server side, ftp directories and files from window NT first, and make the same directories with window NT on the server side at the same time.&lt;BR /&gt;&lt;BR /&gt;Your reply will be really appreciated.&lt;BR /&gt;&lt;BR /&gt;Shawn&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 28 Mar 2002 19:33:20 GMT</pubDate>
    <dc:creator>Victor_5</dc:creator>
    <dc:date>2002-03-28T19:33:20Z</dc:date>
    <item>
      <title>Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693153#M842844</link>
      <description>I am looking for a script which can do:&lt;BR /&gt;&lt;BR /&gt;Working on the unix server side, ftp directories and files from window NT first, and make the same directories with window NT on the server side at the same time.&lt;BR /&gt;&lt;BR /&gt;Your reply will be really appreciated.&lt;BR /&gt;&lt;BR /&gt;Shawn&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Mar 2002 19:33:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693153#M842844</guid>
      <dc:creator>Victor_5</dc:creator>
      <dc:date>2002-03-28T19:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693154#M842845</link>
      <description>you can do something like this. &lt;BR /&gt;&lt;BR /&gt;ftp -i -n &amp;lt;&amp;lt;-EOF &lt;BR /&gt;open &lt;A href="http://www.xxx.xxx" target="_blank"&gt;www.xxx.xxx&lt;/A&gt; &lt;BR /&gt;user user_name password &lt;BR /&gt;bin &lt;BR /&gt;put file_log &lt;BR /&gt;quit &lt;BR /&gt;EOF &lt;BR /&gt;&lt;BR /&gt;Sandip</description>
      <pubDate>Thu, 28 Mar 2002 19:49:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693154#M842845</guid>
      <dc:creator>Sandip Ghosh</dc:creator>
      <dc:date>2002-03-28T19:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693155#M842846</link>
      <description>Hi: &lt;BR /&gt;&lt;BR /&gt;In the past, I used to do this stuff in the shell but now I NEVER do because I have found a much cleaner way to do it that makes error trapping duck soup. Do this stuff in Perl using the Net::FTP module which is available from &lt;A href="http://www.cpan.org" target="_blank"&gt;http://www.cpan.org&lt;/A&gt; . &lt;BR /&gt;&lt;BR /&gt;Here's how simple it can be: &lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w &lt;BR /&gt;&lt;BR /&gt;use Net::FTP; &lt;BR /&gt;use strict; &lt;BR /&gt;&lt;BR /&gt;my $ftp = Net::FTP-&amp;gt;new("remotehost",Debug =&amp;gt; 0); &lt;BR /&gt;$ftp-&amp;gt;login("cstephen","top_secret"); &lt;BR /&gt;$ftp-&amp;gt;cwd("/tmp"); &lt;BR /&gt;$ftp-&amp;gt;get("myfile"); &lt;BR /&gt;my $stat = $ftp-&amp;gt;status; &lt;BR /&gt;my $full_stat = $ftp-&amp;gt;code; &lt;BR /&gt;# $stat contains the first digit; usually all &lt;BR /&gt;# that you need to do is test if it is equal &lt;BR /&gt;# to 2. $full_stat contains the full 3-digit &lt;BR /&gt;# value but is seldom needed &lt;BR /&gt;printf("Status: %d Full Status: %d\n",$stat,$full_stat); &lt;BR /&gt;# Sample Test &lt;BR /&gt;if ($stat == 2) &lt;BR /&gt;{ &lt;BR /&gt;print "Get was good\n"; &lt;BR /&gt;} &lt;BR /&gt;else &lt;BR /&gt;{ &lt;BR /&gt;print "Get was bad\n"; &lt;BR /&gt;} &lt;BR /&gt;$ftp-&amp;gt;quit; &lt;BR /&gt;&lt;BR /&gt;I think if you start using this module you will never go back to shell scripting FTP. Moreover, these same scripts will run in the NT world. You can download a free version of perl for windows at &lt;A href="http://www.activeperl.com." target="_blank"&gt;http://www.activeperl.com.&lt;/A&gt; &lt;BR /&gt;Note that the answer is now the same on UNIX and NT and on the same subnet or across the net. Error checking in traditional scripts is far from easy; it can be done but why bother?&lt;BR /&gt;Perl makes it so simple. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Notice that this method easily handles the error checking. If you like, you can use the shell for most of your script and simply use a bit a perl for the actual FTP transfers. In that case add the statement exit($stat) to the perl script and then your shell script does have a valid status indication. &lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Thu, 28 Mar 2002 19:54:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693155#M842846</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-03-28T19:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693156#M842847</link>
      <description>Well spoken Clay! :)&lt;BR /&gt;&lt;BR /&gt;Though for Win32, I'd go for the Cygwin solution, which makes it much more easy for HP-UX users to use Win32 instable working environments.&lt;BR /&gt;&lt;BR /&gt;Cygwin comes with a 5.6.1 port and a ready to go GNU C compiler, so you can add your own missing modules if they use XS.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cygwin.com" target="_blank"&gt;www.cygwin.com&lt;/A&gt; click on the setup icon in the top right corner&lt;BR /&gt;&lt;BR /&gt;The documentation that comes with activbestate is very good and easy to browse</description>
      <pubDate>Thu, 28 Mar 2002 19:59:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693156#M842847</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-03-28T19:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693157#M842848</link>
      <description>Hi guys&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;I will have a try!</description>
      <pubDate>Thu, 28 Mar 2002 20:39:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693157#M842848</guid>
      <dc:creator>Victor_5</dc:creator>
      <dc:date>2002-03-28T20:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693158#M842849</link>
      <description>Hi Clay &lt;BR /&gt;&lt;BR /&gt;I just found I could not use perl in my unix server.&lt;BR /&gt;So, could you have some idea to use shell script to finish that&lt;BR /&gt;&lt;BR /&gt;very appreciate&lt;BR /&gt;&lt;BR /&gt;Shawn</description>
      <pubDate>Thu, 28 Mar 2002 20:53:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693158#M842849</guid>
      <dc:creator>Victor_5</dc:creator>
      <dc:date>2002-03-28T20:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script for ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693159#M842850</link>
      <description>Hello Shawn,&lt;BR /&gt;&lt;BR /&gt;Download perl from Hp's porting centre and install it. It's a "Good to have" and more important is  It's a free stuff&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Languages/perl-5.6.1/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Languages/perl-5.6.1/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Havefun with perl...&lt;BR /&gt;&lt;BR /&gt;-USA..</description>
      <pubDate>Thu, 28 Mar 2002 22:00:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-ftp/m-p/2693159#M842850</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2002-03-28T22:00:31Z</dc:date>
    </item>
  </channel>
</rss>

