<?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: Awk output redirection? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648214#M722816</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Btw, I notice that you missed out the ending single-quote in your awk command. Perhaps a typo?&lt;BR /&gt;&lt;BR /&gt;awk '{if ( $2 == "Z" ) print $0}'&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
    <pubDate>Fri, 18 Jan 2002 10:42:59 GMT</pubDate>
    <dc:creator>Steven Sim Kok Leong</dc:creator>
    <dc:date>2002-01-18T10:42:59Z</dc:date>
    <item>
      <title>Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648210#M722812</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a simple awk statement in my script which checks some stuff. If i run the statemtn from the command line i get exactly the output i want.&lt;BR /&gt;&lt;BR /&gt;The problem is when i put it in the script and try to redirect the output to a file. It doesnt work. &lt;BR /&gt;awk '{if ( $2 == "Z" ) print $0} &lt;BR /&gt;&lt;BR /&gt;How do i get the output to append to a logfile which i need to declare in a variable in the script or within the awk statement?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Jan 2002 10:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648210#M722812</guid>
      <dc:creator>Boudewijn</dc:creator>
      <dc:date>2002-01-18T10:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648211#M722813</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Hope I get you right.&lt;BR /&gt;&lt;BR /&gt;Script:&lt;BR /&gt;====================================&lt;BR /&gt;LOGFILE=/var/adm/syslog/mylog&lt;BR /&gt;&lt;BR /&gt;awk '{if ( $2 == "Z" ) print $0} &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;====================================&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 18 Jan 2002 10:24:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648211#M722813</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-01-18T10:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648212#M722814</link>
      <description>try this:&lt;BR /&gt;&lt;BR /&gt;eval " awk '{if ( $2 == "Z" ) print $0} " &amp;gt;&amp;gt; logfile&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;mark</description>
      <pubDate>Fri, 18 Jan 2002 10:24:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648212#M722814</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-01-18T10:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648213#M722815</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;awk '{if ( $2 == "Z" ) print $0} &amp;gt;&amp;gt; /tmp/logfile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Fri, 18 Jan 2002 10:25:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648213#M722815</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-01-18T10:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648214#M722816</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Btw, I notice that you missed out the ending single-quote in your awk command. Perhaps a typo?&lt;BR /&gt;&lt;BR /&gt;awk '{if ( $2 == "Z" ) print $0}'&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 18 Jan 2002 10:42:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648214#M722816</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-01-18T10:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648215#M722817</link>
      <description>The problem at the moment is that if i specify a relative PATH it works, but when I declare a variable like LOGFILE="/export/...." and then redirect the output to ${LOGFILE} then i get nothing.</description>
      <pubDate>Fri, 18 Jan 2002 12:04:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648215#M722817</guid>
      <dc:creator>Boudewijn</dc:creator>
      <dc:date>2002-01-18T12:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648216#M722818</link>
      <description>&lt;BR /&gt;LOGFILE=/export/.....&lt;BR /&gt;&lt;BR /&gt;export LOGFILE&lt;BR /&gt;&lt;BR /&gt;## redirection outside awk&lt;BR /&gt;awk ' $2 == "ZZ" { print $0 }' file &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;&lt;BR /&gt;## redirection inside awk&lt;BR /&gt;&lt;BR /&gt;awk ' $2 == "Z" { print $0 &amp;gt;&amp;gt; log}' log=$LOGFILE file&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Jan 2002 12:11:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648216#M722818</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2002-01-18T12:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Awk output redirection?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648217#M722819</link>
      <description>Thx for all the help but it was osmthing very VERY stupid. I forgot one directory in my path.&lt;BR /&gt;&lt;BR /&gt;Explains why the relative worked and the absolute path didnt. the files were one dir. up :)&lt;BR /&gt;&lt;BR /&gt;But thx alot anyway!!</description>
      <pubDate>Fri, 18 Jan 2002 13:01:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-output-redirection/m-p/2648217#M722819</guid>
      <dc:creator>Boudewijn</dc:creator>
      <dc:date>2002-01-18T13:01:15Z</dc:date>
    </item>
  </channel>
</rss>

