<?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 within a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455581#M12380</link>
    <description>There have been a number of very good threads on this subject ... you can do a search on with the SEARCH button at the top left.. (with the keywords script ftp) to get you started:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x19587e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x19587e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0830559ff7cd4118fef0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0830559ff7cd4118fef0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf4677e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf4677e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 19 Oct 2000 14:00:34 GMT</pubDate>
    <dc:creator>Kofi ARTHIABAH</dc:creator>
    <dc:date>2000-10-19T14:00:34Z</dc:date>
    <item>
      <title>FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455578#M12377</link>
      <description>I am trying to create a script that will ftp orders to another machine whenever the order is created.  I figured I would set it up as a cron job for checking.  My problem is I don't know how to execute a command within a script.  It stops at ftp and waits for input from the keyboard.  When I quit the command it executes the rest of the script.  &lt;BR /&gt;&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Thu, 19 Oct 2000 13:54:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455578#M12377</guid>
      <dc:creator>Marie Eldridge_1</dc:creator>
      <dc:date>2000-10-19T13:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455579#M12378</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try:&lt;BR /&gt;&lt;BR /&gt;ftp -n &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;open &lt;HOSTNAME&gt;&lt;BR /&gt;user &lt;USER&gt; &lt;PASSWORD&gt;&lt;BR /&gt;get ....&lt;BR /&gt;put...&lt;BR /&gt;bye&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/PASSWORD&gt;&lt;/USER&gt;&lt;/HOSTNAME&gt;</description>
      <pubDate>Thu, 19 Oct 2000 13:58:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455579#M12378</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2000-10-19T13:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455580#M12379</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;There are lots and lots of posts in this forum to show you different ways to do this.  Do a search on 'ftp'.  Here are some just to start you off!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0830559ff7cd4118fef0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0830559ff7cd4118fef0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x00517e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x00517e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Oct 2000 13:58:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455580#M12379</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-10-19T13:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455581#M12380</link>
      <description>There have been a number of very good threads on this subject ... you can do a search on with the SEARCH button at the top left.. (with the keywords script ftp) to get you started:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x19587e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x19587e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0830559ff7cd4118fef0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0830559ff7cd4118fef0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf4677e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf4677e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Oct 2000 14:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455581#M12380</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-10-19T14:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455582#M12381</link>
      <description>Hi this format will automate you ftp, just fill in the details and put an entry in your crontab for when.   &lt;BR /&gt;________________cut_____________                            &lt;BR /&gt;ftp -n (IP ADRESS) &amp;lt;&amp;lt; End_of_Ftp &lt;BR /&gt;user (LOGIN) (PASSWORD)              &lt;BR /&gt;prompt                            &lt;BR /&gt;mput (FILENAMES)                         &lt;BR /&gt;#or&lt;BR /&gt;put (FILENAME)                   &lt;BR /&gt;quit                              &lt;BR /&gt;End_of_Ftp                        &lt;BR /&gt;________________cut_____________&lt;BR /&gt;&lt;BR /&gt;Best wishes</description>
      <pubDate>Thu, 19 Oct 2000 14:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455582#M12381</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2000-10-19T14:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455583#M12382</link>
      <description>You can also use a command like this:&lt;BR /&gt;&lt;BR /&gt;ftp -i -n &amp;lt; "ftpfilename"&lt;BR /&gt;&lt;BR /&gt;where filename is a file with ftp command like:&lt;BR /&gt;&lt;BR /&gt;open "HOSTNAME"&lt;BR /&gt;users  USERS PASSWD&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;bye&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Be sure what USERS has ftp authorization.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Oct 2000 15:51:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455583#M12382</guid>
      <dc:creator>BONNAFOUS Jean Marc</dc:creator>
      <dc:date>2000-10-19T15:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455584#M12383</link>
      <description>I use something like this on HP-UX 10.20&lt;BR /&gt;&lt;BR /&gt;  #  ftp to NT server to get the report&lt;BR /&gt;  #&lt;BR /&gt;  (&lt;BR /&gt;    echo "open 000.000.000.000"&lt;BR /&gt;    echo "user anonymous from_script"&lt;BR /&gt;    echo "ascii"&lt;BR /&gt;    echo "get checkfab.txt"&lt;BR /&gt;    echo"bye"&lt;BR /&gt;  ) | ftp -i -n&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Oct 2000 11:15:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455584#M12383</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-10-20T11:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455585#M12384</link>
      <description>Oh Marie,&lt;BR /&gt;&lt;BR /&gt;please, read the man-page. I am getting really sick of those "scripts" trying&lt;BR /&gt;to control the ftp session with input redirection...&lt;BR /&gt;Create a file "$HOME/.netrc" and put in something like:&lt;BR /&gt;&lt;BR /&gt;   machine 1.2.3.4 user fred password secret macdef init&lt;BR /&gt;   bin&lt;BR /&gt;   cd /target-dir&lt;BR /&gt;   lcd /source-dir&lt;BR /&gt;   prompt&lt;BR /&gt;   mput *&lt;BR /&gt;   quit&lt;BR /&gt;&lt;BR /&gt;Attention: there must be an empty line after this paragraph.&lt;BR /&gt;Next time your start "ftp" and point it to station "1.2.3.4", it&lt;BR /&gt;will start transfering all files from your local directory "/source-dir"&lt;BR /&gt;to the directory "/target-dir" on station "1.2.3.4" using binary&lt;BR /&gt;transfer.&lt;BR /&gt;The macro "init" will be automatically started after logging in&lt;BR /&gt;on the target station.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;   Wodisch&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Oct 2000 13:12:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455585#M12384</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2000-10-20T13:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455586#M12385</link>
      <description>I have found on occasion when the ftp servers are slow or connectivity is slow that the input to EOF gets out of sync.  The "expect" scripting language will allow for 'wait for' prompting.  This software is available on the HP software porting and archive center site.</description>
      <pubDate>Fri, 20 Oct 2000 19:54:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455586#M12385</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2000-10-20T19:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455587#M12386</link>
      <description>Just as a (probably idle) addition to the last responder,&lt;BR /&gt;in case you aren't particularily fond of TCL/Expect (like me ;-) but rather are into Perl, there is a nice CPAN module Net::FTP for automating FTP sessions.&lt;BR /&gt;But then I guess, you would probably know.&lt;BR /&gt;Type "perldoc Net::FTP" to find out if it's installed on your box.&lt;BR /&gt;As to the posters with the "Here File" solutions ("&amp;lt;&lt;TAG&gt;&lt;/TAG&gt;For instance, the ~/.netrc thing wouldn't work unless the file is solely readable to the owner, for that reason.&lt;BR /&gt;But as others already mentioned consult the ftp manpage.</description>
      <pubDate>Mon, 23 Oct 2000 08:18:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455587#M12386</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2000-10-23T08:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: FTP within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455588#M12387</link>
      <description>Thanks for your help.  There were lots of great suggestions.</description>
      <pubDate>Fri, 03 Nov 2000 16:22:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-within-a-script/m-p/2455588#M12387</guid>
      <dc:creator>Marie Eldridge_1</dc:creator>
      <dc:date>2000-11-03T16:22:48Z</dc:date>
    </item>
  </channel>
</rss>

