<?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: About shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242533#M330175</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you want to log the files transfered, capture the session's dialog in a log file and parse the output.  Change your script, as posted, to look like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;typeset LOG=/var/tmp/output.$$&lt;BR /&gt;ftp -inv&amp;lt;&lt;EOF&gt;&amp;gt; ${LOG}&lt;BR /&gt;cd /tmp&lt;BR /&gt;mput *&lt;BR /&gt;bye&lt;BR /&gt;EOF!&lt;BR /&gt;echo "See: '${LOG}'"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/EOF&gt;</description>
    <pubDate>Wed, 30 Jul 2008 11:19:38 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-07-30T11:19:38Z</dc:date>
    <item>
      <title>About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242527#M330169</link>
      <description>I have two question2 &lt;BR /&gt;&lt;BR /&gt;1. I use the command "comp" to compare the difference of two directory , then output will be write (appending)  to a log, &lt;BR /&gt;&lt;BR /&gt;eg. comp directory1 directory2 &amp;gt;&amp;gt; /tmp/comp_log&lt;BR /&gt;&lt;BR /&gt;it is OK , but if I want when write the output to the log , it also write down the current time and date so that I can more easily to trace the error , can advise what can i do ? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2. I have a ftp script to a file as below&lt;BR /&gt;&lt;BR /&gt;ftp ip  &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;cd /tmp&lt;BR /&gt;mput *&lt;BR /&gt;bye &lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;it is OK , it ftp all files to /tmp , but if I want to log down all file name that HAVE transferred , can advise what can i do ? thx</description>
      <pubDate>Wed, 30 Jul 2008 03:16:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242527#M330169</guid>
      <dc:creator>haeman</dc:creator>
      <dc:date>2008-07-30T03:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242528#M330170</link>
      <description>&lt;!--!*#--&gt;1. How about this?:&lt;BR /&gt;&lt;BR /&gt;    date &amp;gt;&amp;gt; /tmp/comp_log</description>
      <pubDate>Wed, 30 Jul 2008 03:57:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242528#M330170</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-07-30T03:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242529#M330171</link>
      <description>date &amp;gt;&amp;gt; /tmp/comp_log seems not work&lt;BR /&gt;&lt;BR /&gt;the comp would write the error when have difference and do not write anything when no difference , I only want it write down the time when have error , what can i do ? thx</description>
      <pubDate>Wed, 30 Jul 2008 04:02:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242529#M330171</guid>
      <dc:creator>haeman</dc:creator>
      <dc:date>2008-07-30T04:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242530#M330172</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;for that you can check exit status (echo $?) of comp process and accordingly you append/not date output in log file!</description>
      <pubDate>Wed, 30 Jul 2008 04:06:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242530#M330172</guid>
      <dc:creator>Shrikant Lavhate</dc:creator>
      <dc:date>2008-07-30T04:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242531#M330173</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;it is OK for my first problem , but I can't solve the second problem , please help , thx</description>
      <pubDate>Wed, 30 Jul 2008 08:15:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242531#M330173</guid>
      <dc:creator>haeman</dc:creator>
      <dc:date>2008-07-30T08:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242532#M330174</link>
      <description>if i understand u correctly about the 2nd q&lt;BR /&gt;try to write something on the top of your ftp script like;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;exec 1&amp;gt;/tmp/ftp_transferlog 2&amp;gt;&amp;amp;1&lt;BR /&gt;set -o xtrace&lt;BR /&gt;Good Luck,&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2008 08:26:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242532#M330174</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2008-07-30T08:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242533#M330175</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you want to log the files transfered, capture the session's dialog in a log file and parse the output.  Change your script, as posted, to look like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;typeset LOG=/var/tmp/output.$$&lt;BR /&gt;ftp -inv&amp;lt;&lt;EOF&gt;&amp;gt; ${LOG}&lt;BR /&gt;cd /tmp&lt;BR /&gt;mput *&lt;BR /&gt;bye&lt;BR /&gt;EOF!&lt;BR /&gt;echo "See: '${LOG}'"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/EOF&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:19:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242533#M330175</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-07-30T11:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242534#M330176</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;I tried Cem Tugrul and James R. Ferguson 's method , it can log all process that in the ftp process , what I would like is to log  the transferred file only , not the messages of the transfer process , can advise what can i do ? thx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;log&lt;BR /&gt;=======&lt;BR /&gt;Connected to 192.168.0.1&lt;BR /&gt;220 (vsFTPd 2.0.5)&lt;BR /&gt;530 Please login with USER and PASS.&lt;BR /&gt;530 Please login with USER and PASS.&lt;BR /&gt;Interactive mode on.&lt;BR /&gt;Passive mode off.&lt;BR /&gt;530 Please login with USER and PASS.&lt;BR /&gt;Local directory now /ora&lt;BR /&gt;530 Please login with USER and PASS.&lt;BR /&gt;mput aaa? 530 Please login with USER and PASS.&lt;BR /&gt;mput bbb? 530 Please login with USER and PASS.&lt;BR /&gt;mput ccc? 530 Please login with USER and PASS.&lt;BR /&gt;Please login with USER and PASS.&lt;BR /&gt;Please login with USER and PASS.&lt;BR /&gt;"&lt;BR /&gt;"&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Aug 2008 09:57:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242534#M330176</guid>
      <dc:creator>haeman</dc:creator>
      <dc:date>2008-08-14T09:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: About shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242535#M330177</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; what I would like is to log the transferred file only , not the messages of the transfer process&lt;BR /&gt;&lt;BR /&gt;What's so hard about parsing the output file of the FTP, as I suggested, and logging (appending) successful transfer information to a *separate* log?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 14 Aug 2008 11:16:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-shell-script/m-p/4242535#M330177</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-14T11:16:23Z</dc:date>
    </item>
  </channel>
</rss>

