<?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: Having FTP automatically executed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416894#M765247</link>
    <description>This type of stdin redirection will work to automate your ftp session.  &lt;BR /&gt;However, I recommend that you never place a user name and password in a flat &lt;BR /&gt;file like this.  You can automate an ftp login by editing the .netrc file in &lt;BR /&gt;the appropriate user's home directory.&lt;BR /&gt;&lt;BR /&gt;Use "man netrc" for details.</description>
    <pubDate>Mon, 20 Dec 1999 07:15:23 GMT</pubDate>
    <dc:creator>Alan Riggs_1</dc:creator>
    <dc:date>1999-12-20T07:15:23Z</dc:date>
    <item>
      <title>Having FTP automatically executed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416892#M765245</link>
      <description>Hello,&lt;BR /&gt;I'm a really green newbie in HP-UX, searching &lt;BR /&gt;for a simple way of having a list of commands&lt;BR /&gt;automatically executed in FTP.  Is there a way&lt;BR /&gt;of doing it?  Can a "batch" file be passed as&lt;BR /&gt;an argument to the FTP command?&lt;BR /&gt;Thankful for any help,&lt;BR /&gt;Rachid.</description>
      <pubDate>Sat, 18 Dec 1999 14:23:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416892#M765245</guid>
      <dc:creator>Rachid Abrahin neto</dc:creator>
      <dc:date>1999-12-18T14:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Having FTP automatically executed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416893#M765246</link>
      <description>You can use a "HERE" script somthing like this to automate ftp transactions.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;SOURCE=$1&lt;BR /&gt;ftp -n $SOURCE &amp;lt;&lt;ENDFTP&gt;&lt;/ENDFTP&gt;ascii&lt;BR /&gt;user username password&lt;BR /&gt;lcd&lt;BR /&gt;get /tmp/crap&lt;BR /&gt;EndFTP</description>
      <pubDate>Sun, 19 Dec 1999 21:30:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416893#M765246</guid>
      <dc:creator>Anthony Goonetilleke_1</dc:creator>
      <dc:date>1999-12-19T21:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Having FTP automatically executed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416894#M765247</link>
      <description>This type of stdin redirection will work to automate your ftp session.  &lt;BR /&gt;However, I recommend that you never place a user name and password in a flat &lt;BR /&gt;file like this.  You can automate an ftp login by editing the .netrc file in &lt;BR /&gt;the appropriate user's home directory.&lt;BR /&gt;&lt;BR /&gt;Use "man netrc" for details.</description>
      <pubDate>Mon, 20 Dec 1999 07:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416894#M765247</guid>
      <dc:creator>Alan Riggs_1</dc:creator>
      <dc:date>1999-12-20T07:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Having FTP automatically executed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416895#M765248</link>
      <description>After you set up your .netrc file (see netrc manpage and remember to chmod 400 &lt;BR /&gt;.netrc) put some lines something like this in a shell script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;# Initialize some variables&lt;BR /&gt;SOURCE_DIR=your_source_dir_name&lt;BR /&gt;TARGET_DIR=your_target_dir_name&lt;BR /&gt;TARGET_MACHINE=your_target_machine_name&lt;BR /&gt;DATA_FILE=your_data_file_name&lt;BR /&gt;&lt;BR /&gt;# Build ftp command file&lt;BR /&gt;echo "bin" &amp;gt; ${HOME}/.commands&lt;BR /&gt;echo "hash" &amp;gt;&amp;gt; ${HOME}/.commands&lt;BR /&gt;echo "prompt" &amp;gt;&amp;gt; ${HOME}/.commands&lt;BR /&gt;echo "cd " ${SOURCE_DIR} &amp;gt;&amp;gt; ${HOME}/.commands&lt;BR /&gt;echo "lcd " ${TARGET_DIR} &amp;gt;&amp;gt; ${HOME}/.commands&lt;BR /&gt;echo "put " ${DATA_FILE} &amp;gt;&amp;gt; ${HOME}/.commands&lt;BR /&gt;echo "quit" &amp;gt;&amp;gt; ${HOME}/.commands&lt;BR /&gt;&lt;BR /&gt;# Do the ftp and log the output&lt;BR /&gt;cat ${HOME}/.commands | ftp ${TARGET_MACHINE} &amp;gt; \ /tmp/ftp_log&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Make the file executable and run it from cron and you're done.&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Dec 1999 10:48:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/having-ftp-automatically-executed/m-p/2416895#M765248</guid>
      <dc:creator>Ric Bradley_2</dc:creator>
      <dc:date>1999-12-20T10:48:51Z</dc:date>
    </item>
  </channel>
</rss>

