<?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 command error handling in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795965#M265772</link>
    <description>hi;&lt;BR /&gt;&lt;BR /&gt;i did it like this: i directed ftp command output to a file.&lt;BR /&gt;&lt;BR /&gt;ftp -n &amp;gt;x_mylog &amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;and after command finished, i searched needed words to examine the result.&lt;BR /&gt;</description>
    <pubDate>Mon, 29 May 2006 01:59:35 GMT</pubDate>
    <dc:creator>Kenan Erdey</dc:creator>
    <dc:date>2006-05-29T01:59:35Z</dc:date>
    <item>
      <title>ftp command error handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795963#M265770</link>
      <description>Hi all :&lt;BR /&gt;&lt;BR /&gt;  I write a shell to run ftp transfering files&lt;BR /&gt;  and I get the $? after running ftp command to&lt;BR /&gt;  tell if anything wrong with ftp connection.&lt;BR /&gt;  But it seems $? could not get all the &lt;BR /&gt;  error condition.&lt;BR /&gt;&lt;BR /&gt;  Would you mind telling me how you deal with&lt;BR /&gt;  the ftp command error to tell whether the&lt;BR /&gt;  ftp transfering file or getting file running &lt;BR /&gt;  ok.&lt;BR /&gt;&lt;BR /&gt;  Thank you !!&lt;BR /&gt;  Regards,&lt;BR /&gt;  Steven</description>
      <pubDate>Mon, 29 May 2006 01:52:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795963#M265770</guid>
      <dc:creator>steven chang_1</dc:creator>
      <dc:date>2006-05-29T01:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command error handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795964#M265771</link>
      <description>Steven, &lt;BR /&gt;I'm not sure you can achieve this using shell. &lt;BR /&gt;A possible way is using perl + Net::FTP + expect to control results of each individual ftp command. &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;antonio.&lt;BR /&gt;</description>
      <pubDate>Mon, 29 May 2006 01:56:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795964#M265771</guid>
      <dc:creator>Antonio Cardoso_1</dc:creator>
      <dc:date>2006-05-29T01:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command error handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795965#M265772</link>
      <description>hi;&lt;BR /&gt;&lt;BR /&gt;i did it like this: i directed ftp command output to a file.&lt;BR /&gt;&lt;BR /&gt;ftp -n &amp;gt;x_mylog &amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;and after command finished, i searched needed words to examine the result.&lt;BR /&gt;</description>
      <pubDate>Mon, 29 May 2006 01:59:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795965#M265772</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2006-05-29T01:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command error handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795966#M265773</link>
      <description>Thank you all your response!!&lt;BR /&gt;&lt;BR /&gt;  It seems it's not easy to distiguish the&lt;BR /&gt;  error from ftp command.&lt;BR /&gt;  &lt;BR /&gt;  I take a cosideration for direct the &lt;BR /&gt;  ftp procedure to an log file and &lt;BR /&gt;  do regular expression to search error&lt;BR /&gt;  condition or&lt;BR /&gt;  writing C program or using other language&lt;BR /&gt;  to handle file funtion.&lt;BR /&gt;&lt;BR /&gt;  But you know the both above costs too much.&lt;BR /&gt;  I am a supplier , and everything change &lt;BR /&gt;  need to evaluate the cost for my customers.&lt;BR /&gt;&lt;BR /&gt;  Anyway , thank you very much!!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steven&lt;BR /&gt;</description>
      <pubDate>Mon, 29 May 2006 02:14:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795966#M265773</guid>
      <dc:creator>steven chang_1</dc:creator>
      <dc:date>2006-05-29T02:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command error handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795967#M265774</link>
      <description>Like most network commands that connect to a remote system, the exit code only referes to the ability to connect. So if ftp fails to connect (ie, remote system is offline or unreachable) then the exit code is non-zero. What happens during the ftp session cannot be returned as an error code. The reason is that like ping, some commands work, some don't. &lt;BR /&gt; &lt;BR /&gt;For instance, a CD, LCD or DIR can fail just like a PUT or GET. Suppose that 3 files are sent to the remote server but 1 fails. What would be the error code? 0.333 perhaps? And there are really two failure points for a file transfer. An error can occur on the source machine such as file not found or permission denied (to read), or on the destination machine such as permission denied (to write into a particular directory).&lt;BR /&gt; &lt;BR /&gt;So you must collect all the output from the ftp session, and test each command and result for success of failure. You don't need to write a C program to do this -- standard scripting techniques will work just fine, but you'll need some experienced help writing the script.</description>
      <pubDate>Mon, 29 May 2006 09:16:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795967#M265774</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-05-29T09:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command error handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795968#M265775</link>
      <description>As already mentioned, Perl's Net::FTP module makes this trivially easy. Do a search of the forums for "ftpget.pl" and/or "ftpput.pl". These 2 Perl scripts do everythingthing for you and all you have to do from the shell is test $?. If it's zero then the command worked. There is even an optional automatic retry if the transfer fails.</description>
      <pubDate>Mon, 29 May 2006 21:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command-error-handling/m-p/3795968#M265775</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-05-29T21:16:55Z</dc:date>
    </item>
  </channel>
</rss>

