<?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: Simple Automated FTP Scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504107#M21311</link>
    <description>Here is a thread that has a few automated ftp scripts..what you may need to do is add a statement that performs a test or does a loop based on&lt;BR /&gt; 'if the file exists -f   or    if the file exists and  the size is greater than zero -s ' &lt;BR /&gt;you can do this in a POSIX shell with a:&lt;BR /&gt;test -f /dir/filename       or     test -s /dir/filename&lt;BR /&gt;..OR you could do it with a conditional statment&lt;BR /&gt;[[ -f /dir/filename ]]      or     [[ -s /dir/filename]]&lt;BR /&gt;&lt;BR /&gt;then incorporte the auto ftp statements..&lt;BR /&gt;&lt;BR /&gt;Just something to get you started,&lt;BR /&gt;/rcw&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Mar 2001 21:08:53 GMT</pubDate>
    <dc:creator>Rita C Workman</dc:creator>
    <dc:date>2001-03-14T21:08:53Z</dc:date>
    <item>
      <title>Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504105#M21309</link>
      <description>I am in need of an FTP script or utility to transfer a file back and forth from a vendors server on a daily basis.  The script/utility would need the capability of checking if the file exists and if it is complete before proceeding (possibly by checking the file size or date).&lt;BR /&gt;&lt;BR /&gt;I am new to Unix scripting, and I admit this is above my abilities (I am an expert from the NT world).  However, I am capable of modifying any current script to work.&lt;BR /&gt;&lt;BR /&gt;I am humbly hoping there is a current good script out there or a good utility to accomplish this task.&lt;BR /&gt;&lt;BR /&gt;Thanks Everyone.&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Mar 2001 21:53:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504105#M21309</guid>
      <dc:creator>Alex St. Amand_1</dc:creator>
      <dc:date>2001-03-12T21:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504106#M21310</link>
      <description>Well if you had a way of knowing when the file was finished building -- such as a trailer or a second empty file denoting completion.&lt;BR /&gt;&lt;BR /&gt;You could write  a script to login a try and get the empty completion file -&lt;BR /&gt;If it fails then the file isn't completed.&lt;BR /&gt;-&lt;BR /&gt;If it succeds then delete the empty completion file and download the other file.&lt;BR /&gt;&lt;BR /&gt;I could give you some example scripts if you need them.</description>
      <pubDate>Wed, 14 Mar 2001 20:54:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504106#M21310</guid>
      <dc:creator>Mark Huff II</dc:creator>
      <dc:date>2001-03-14T20:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504107#M21311</link>
      <description>Here is a thread that has a few automated ftp scripts..what you may need to do is add a statement that performs a test or does a loop based on&lt;BR /&gt; 'if the file exists -f   or    if the file exists and  the size is greater than zero -s ' &lt;BR /&gt;you can do this in a POSIX shell with a:&lt;BR /&gt;test -f /dir/filename       or     test -s /dir/filename&lt;BR /&gt;..OR you could do it with a conditional statment&lt;BR /&gt;[[ -f /dir/filename ]]      or     [[ -s /dir/filename]]&lt;BR /&gt;&lt;BR /&gt;then incorporte the auto ftp statements..&lt;BR /&gt;&lt;BR /&gt;Just something to get you started,&lt;BR /&gt;/rcw&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Mar 2001 21:08:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504107#M21311</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2001-03-14T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504108#M21312</link>
      <description>Hi Alex,&lt;BR /&gt;&lt;BR /&gt;the easiest way, to be sure that the file is finished, is to rename it after the transmission in your ftp script&lt;BR /&gt;&lt;BR /&gt;ftp&amp;gt; put myfile.intransmission&lt;BR /&gt;ftp&amp;gt; rename myfile.intransmission myfile.completed&lt;BR /&gt;&lt;BR /&gt;To have automatic login, check out ".netrc" file.&lt;BR /&gt;&lt;BR /&gt;When you receive the file, you should make a local copy of it, so the next transfer can do a "cmp" to check if it is diffrent.&lt;BR /&gt;&lt;BR /&gt;Just a few guidelines.&lt;BR /&gt;Volker&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2001 19:00:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504108#M21312</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2001-03-15T19:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504109#M21313</link>
      <description>Alex,&lt;BR /&gt;&lt;BR /&gt;Attached is a copy of a script that I've been using to ftp files back and fourth from our servers.  It works just fine for the actual portion of doing the ftp for you from a shell script, however it lacks any security features.&lt;BR /&gt;&lt;BR /&gt;Usage: ftp_batch hostname userid passwd get|put src_file dest_file&lt;BR /&gt;&lt;BR /&gt;Looks like Rita's post will take care of determining the status of the file and this will give you the ability to do the ftp.  Call this script from your main script and setup that script to run via cron (at in the MS world) and you should be able to accomplish your goal.&lt;BR /&gt;&lt;BR /&gt;- Mike</description>
      <pubDate>Fri, 16 Mar 2001 16:24:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504109#M21313</guid>
      <dc:creator>Mike Hassell</dc:creator>
      <dc:date>2001-03-16T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504110#M21314</link>
      <description>Hi Alex&lt;BR /&gt;A simle way to check if build has finished is to get the system time and compare it with the file time.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTP &lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Sun, 18 Mar 2001 13:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504110#M21314</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-03-18T13:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504111#M21315</link>
      <description>Hi &lt;BR /&gt;Ftp script:-&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PUT check="" script="" here=""&gt;&lt;BR /&gt;Remember to exit here if file is not complete.&lt;BR /&gt;&lt;BR /&gt;ftp -n &lt;IP address=""&gt; &amp;lt;&amp;lt; End_of_Ftp&lt;BR /&gt;user &lt;LOGIN&gt; &lt;PASSWORD&gt;             &lt;BR /&gt;prompt                           &lt;BR /&gt;put &lt;FILENAME&gt;                  &lt;BR /&gt;quit                             &lt;BR /&gt;End_of_Ftp                       &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula&lt;/FILENAME&gt;&lt;/PASSWORD&gt;&lt;/LOGIN&gt;&lt;/IP&gt;&lt;/PUT&gt;</description>
      <pubDate>Sun, 18 Mar 2001 13:30:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504111#M21315</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-03-18T13:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504112#M21316</link>
      <description>Hi Alex,&lt;BR /&gt;&lt;BR /&gt;  If remsh is allowed attached script works fine.&lt;BR /&gt;&lt;BR /&gt; You should keep it in crontab for running on daily basis.&lt;BR /&gt;&lt;BR /&gt;Cheers...&lt;BR /&gt;Satish.&lt;BR /&gt;</description>
      <pubDate>Sun, 18 Mar 2001 18:43:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504112#M21316</guid>
      <dc:creator>satish_4</dc:creator>
      <dc:date>2001-03-18T18:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Automated FTP Scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504113#M21317</link>
      <description>Be sure to manually record all the steps you use to test and get the file.  You can add all of these to your script.  Depending on the remote system, you may be able to use the quote and quote site commands in ftp.   This can give you some remote controls and information.</description>
      <pubDate>Sun, 18 Mar 2001 20:56:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-automated-ftp-scripts/m-p/2504113#M21317</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2001-03-18T20:56:38Z</dc:date>
    </item>
  </channel>
</rss>

