<?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: setting a log_it function in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085028#M92903</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;log_it () {&lt;BR /&gt;awk '{print}' $@&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "jkjkjkjkjk"|log_it&lt;BR /&gt;jkjkjkjkjk&lt;BR /&gt;&lt;BR /&gt;this runs fine on my Hp-UX 11i.&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
    <pubDate>Thu, 20 Dec 2007 08:47:05 GMT</pubDate>
    <dc:creator>Arturo Galbiati</dc:creator>
    <dc:date>2007-12-20T08:47:05Z</dc:date>
    <item>
      <title>setting a log_it function</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085024#M92899</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I want to use a log_it function as below:&lt;BR /&gt;&lt;BR /&gt;LOGFILE=${DIR}/${HOST}_sapno.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;function log_it {&lt;BR /&gt;&lt;BR /&gt;                printf "%s\n" "$*" &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;how can I get the log_it function to record the output of my commands:&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;&lt;BR /&gt;# &lt;COMMAND&gt; |log_it&lt;BR /&gt;&lt;BR /&gt;obviously this doesnt work, I have used this function in the past but cant find my notes.&lt;BR /&gt;&lt;BR /&gt;Thanks for any help&lt;BR /&gt;&lt;BR /&gt;chris&lt;/COMMAND&gt;</description>
      <pubDate>Wed, 19 Dec 2007 14:59:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085024#M92899</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-12-19T14:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: setting a log_it function</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085025#M92900</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;typeset LOGFILE=/tmp/mylog&lt;BR /&gt;function log_it {&lt;BR /&gt;    printf "%s\n" "$*" &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;    eval "$*"          &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;log_it date&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 19 Dec 2007 15:18:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085025#M92900</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-19T15:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: setting a log_it function</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085026#M92901</link>
      <description>will give it a go ...&lt;BR /&gt;&lt;BR /&gt;Thanks James.</description>
      <pubDate>Wed, 19 Dec 2007 15:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085026#M92901</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-12-19T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: setting a log_it function</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085027#M92902</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;to get your output to a logfile via&lt;BR /&gt;# &lt;COMMAND&gt; |log_it&lt;BR /&gt;&lt;BR /&gt;you'll have to read stdin in your function:&lt;BR /&gt;&lt;BR /&gt;function log_it {&lt;BR /&gt;cat &amp;gt;&amp;gt;$LOGFILE&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;or - to get the output in the logfile and on screen:&lt;BR /&gt;function log_it {&lt;BR /&gt;tee -a $LOGFILE&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;/COMMAND&gt;</description>
      <pubDate>Wed, 19 Dec 2007 16:33:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085027#M92902</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-12-19T16:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: setting a log_it function</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085028#M92903</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;log_it () {&lt;BR /&gt;awk '{print}' $@&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "jkjkjkjkjk"|log_it&lt;BR /&gt;jkjkjkjkjk&lt;BR /&gt;&lt;BR /&gt;this runs fine on my Hp-UX 11i.&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 20 Dec 2007 08:47:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085028#M92903</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-12-20T08:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: setting a log_it function</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085029#M92904</link>
      <description>thanks guys</description>
      <pubDate>Thu, 20 Dec 2007 09:32:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setting-a-log-it-function/m-p/5085029#M92904</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-12-20T09:32:13Z</dc:date>
    </item>
  </channel>
</rss>

