<?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: shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588112#M827112</link>
    <description>Excuse me, I failed to state whAt I "thought" was obvious. The error checking we use comes between the quit and the exit. All error checking is done against the ftp.log file.&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;date &amp;gt; /home/ftp.log&lt;BR /&gt;ftp -n -v &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /home/ftp.log&lt;BR /&gt;open servername&lt;BR /&gt;user username password&lt;BR /&gt;put /home/TEST.JOB&lt;BR /&gt;quit&lt;BR /&gt;EOF&lt;BR /&gt;"ERROR CHECKING LOGIC GOES HERE"&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;Unfortunately, there is little perl scripting used here and this is our primary skeleton of an ftp, except as noted, we will use a .netrc and eliminate the hardcoding mentioned before.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
    <pubDate>Thu, 21 Jul 2005 15:43:13 GMT</pubDate>
    <dc:creator>Dave La Mar</dc:creator>
    <dc:date>2005-07-21T15:43:13Z</dc:date>
    <item>
      <title>shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588105#M827104</link>
      <description>good afternoon.. do I need to make a shell to connect me for ftp to a server and to make a get to a file I specify, can they tell me as giving him the parameters so that it is connected, copy and then it is disconnected???  &lt;BR /&gt;  &lt;BR /&gt;thank you...</description>
      <pubDate>Thu, 21 Jul 2005 14:29:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588105#M827104</guid>
      <dc:creator>Fredy Correa</dc:creator>
      <dc:date>2005-07-21T14:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588106#M827105</link>
      <description>check out this thread, substitute a get for the put, but everything else is pretty close to the same.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=937577" target="_blank"&gt;http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=937577&lt;/A&gt;</description>
      <pubDate>Thu, 21 Jul 2005 14:32:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588106#M827105</guid>
      <dc:creator>Alan Meyer_4</dc:creator>
      <dc:date>2005-07-21T14:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588107#M827106</link>
      <description>Fredy-&lt;BR /&gt;There are a tone of examples if use the search function of the forumns.&lt;BR /&gt;&lt;BR /&gt;Here is one of a dozen ways to do this:&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;date &amp;gt; /home/ftp.log              &lt;BR /&gt;ftp -n -v &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /home/ftp.log&lt;BR /&gt;open servername     &lt;BR /&gt;user username password            &lt;BR /&gt;put /home/TEST.JOB                &lt;BR /&gt;quit                              &lt;BR /&gt;EOF                              &lt;BR /&gt;                                  &lt;BR /&gt;exit                              &lt;BR /&gt;&lt;BR /&gt;The log file will containe the results snd output of the job.&lt;BR /&gt;the EOF signifies to perform all instructions until the next occurrence of EOF.&lt;BR /&gt;While this uses a hard coded servername, username, password, it is preferable to use a .netrc file for these values. Man .netrc.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;dl</description>
      <pubDate>Thu, 21 Jul 2005 14:35:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588107#M827106</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2005-07-21T14:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588108#M827107</link>
      <description>Here is something that you might like&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;HOST='ftp.users.abc.net'&lt;BR /&gt;USER='yourid'&lt;BR /&gt;PASSWD='yourpw'&lt;BR /&gt;FILE='file.txt'&lt;BR /&gt;&lt;BR /&gt;ftp -n $HOST &amp;lt;&lt;END_SCRIPT&gt;&lt;/END_SCRIPT&gt;quote USER $USER&lt;BR /&gt;quote PASS $PASSWD&lt;BR /&gt;put $FILE&lt;BR /&gt;quit&lt;BR /&gt;END_SCRIPT&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Jul 2005 14:36:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588108#M827107</guid>
      <dc:creator>Devesh Pant_1</dc:creator>
      <dc:date>2005-07-21T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588109#M827108</link>
      <description>You could but the attached Perl script makes this a trivial execise.&lt;BR /&gt;&lt;BR /&gt;Invoke as perl ftpget.pl -u for full usage. If you create a .netrc file, it will automatically read the password or you can pass it on the command line.&lt;BR /&gt;&lt;BR /&gt;ftpget.pl -h remotehost -l mickey -p topsecret -B -d /xxx/yyy file1 file2&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;then&lt;BR /&gt;  echo "All was well"&lt;BR /&gt;else&lt;BR /&gt;  echo "FTP failed; status ${STAT}" &amp;gt;&amp;amp;2&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Error checking, retries, are built right in.&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Jul 2005 14:37:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588109#M827108</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-07-21T14:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588110#M827109</link>
      <description>By the way, all of these Mickey Mouse scripts that do no error checking would result in somebody being yelled at if they dropped them on my desk.</description>
      <pubDate>Thu, 21 Jul 2005 14:40:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588110#M827109</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-07-21T14:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588111#M827110</link>
      <description>I guess god has spoken</description>
      <pubDate>Thu, 21 Jul 2005 15:35:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588111#M827110</guid>
      <dc:creator>Mr Gunyon</dc:creator>
      <dc:date>2005-07-21T15:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588112#M827112</link>
      <description>Excuse me, I failed to state whAt I "thought" was obvious. The error checking we use comes between the quit and the exit. All error checking is done against the ftp.log file.&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;date &amp;gt; /home/ftp.log&lt;BR /&gt;ftp -n -v &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /home/ftp.log&lt;BR /&gt;open servername&lt;BR /&gt;user username password&lt;BR /&gt;put /home/TEST.JOB&lt;BR /&gt;quit&lt;BR /&gt;EOF&lt;BR /&gt;"ERROR CHECKING LOGIC GOES HERE"&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;Unfortunately, there is little perl scripting used here and this is our primary skeleton of an ftp, except as noted, we will use a .netrc and eliminate the hardcoding mentioned before.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Thu, 21 Jul 2005 15:43:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588112#M827112</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2005-07-21T15:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588113#M827114</link>
      <description>Yes, but you still have to parse the log file and that is a non-trivial task AND you did issue commands w/o checking the status of each. That's why Perl's Net::FTP is so nice; all you have to do is look at the status value and if it's 2 (FTP for good) then all is well. I will concede that you at least gathered a log file.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Jul 2005 17:38:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588113#M827114</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-07-21T17:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588114#M827116</link>
      <description>Use this script available in,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=940553" target="_blank"&gt;http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=940553&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Thu, 21 Jul 2005 22:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3588114#M827116</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-21T22:21:12Z</dc:date>
    </item>
  </channel>
</rss>

