<?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 Help Please. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796765#M941024</link>
    <description>Thank you clay,&lt;BR /&gt;&lt;BR /&gt;when i tried your statement change for the if statement this is the output that i get:if [[ ${status} -eq 0 || ${status} -eq 1 ]] &lt;BR /&gt;then&lt;BR /&gt;   status="$status";&lt;BR /&gt;else&lt;BR /&gt;   status="$status";&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;printf("%s%s%s%s%s%s%s%s%s%s\n",jobid,sta,&lt;BR /&gt;Kbytes,files,compestimated); &lt;BR /&gt;}' &amp;gt; ${TMP_FILE} &lt;BR /&gt; syntax error The source line is 17.&lt;BR /&gt; The error context is&lt;BR /&gt;                if &amp;gt;&amp;gt;&amp;gt;  [ &amp;lt;&amp;lt;&amp;lt; [ ${status} -eq 0 || ${status} -eq 1 ]] &lt;BR /&gt; awk: The statement cannot be correctly parsed.&lt;BR /&gt; The source line is 17.&lt;BR /&gt; syntax error The source line is 19.&lt;BR /&gt;&lt;BR /&gt;Is there something like maybe a ; that has to go at the end of the if,then,else statements since its located in the middle of an AWK statement?&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 29 Aug 2002 13:01:36 GMT</pubDate>
    <dc:creator>fg_1</dc:creator>
    <dc:date>2002-08-29T13:01:36Z</dc:date>
    <item>
      <title>AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796762#M941021</link>
      <description />
      <pubDate>Thu, 29 Aug 2002 12:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796762#M941021</guid>
      <dc:creator>fg_1</dc:creator>
      <dc:date>2002-08-29T12:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796763#M941022</link>
      <description>I suspect you meant&lt;BR /&gt;&lt;BR /&gt;if [ ${STAT} -eq 0 -o ${STAT} -eq 1 ]&lt;BR /&gt;  then&lt;BR /&gt;&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;Better still&lt;BR /&gt;if [[ ${STAT} -eq 0 || ${STAT} -eq 1 ]]&lt;BR /&gt; then&lt;BR /&gt;&lt;BR /&gt; fi&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Aug 2002 12:54:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796763#M941022</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-08-29T12:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796764#M941023</link>
      <description>Hi Frank:&lt;BR /&gt;&lt;BR /&gt;# if [ "$status" = 1 -o "$status" = 2 ]&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 29 Aug 2002 12:57:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796764#M941023</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-08-29T12:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796765#M941024</link>
      <description>Thank you clay,&lt;BR /&gt;&lt;BR /&gt;when i tried your statement change for the if statement this is the output that i get:if [[ ${status} -eq 0 || ${status} -eq 1 ]] &lt;BR /&gt;then&lt;BR /&gt;   status="$status";&lt;BR /&gt;else&lt;BR /&gt;   status="$status";&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;printf("%s%s%s%s%s%s%s%s%s%s\n",jobid,sta,&lt;BR /&gt;Kbytes,files,compestimated); &lt;BR /&gt;}' &amp;gt; ${TMP_FILE} &lt;BR /&gt; syntax error The source line is 17.&lt;BR /&gt; The error context is&lt;BR /&gt;                if &amp;gt;&amp;gt;&amp;gt;  [ &amp;lt;&amp;lt;&amp;lt; [ ${status} -eq 0 || ${status} -eq 1 ]] &lt;BR /&gt; awk: The statement cannot be correctly parsed.&lt;BR /&gt; The source line is 17.&lt;BR /&gt; syntax error The source line is 19.&lt;BR /&gt;&lt;BR /&gt;Is there something like maybe a ; that has to go at the end of the if,then,else statements since its located in the middle of an AWK statement?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Aug 2002 13:01:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796765#M941024</guid>
      <dc:creator>fg_1</dc:creator>
      <dc:date>2002-08-29T13:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796766#M941025</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the lines:&lt;BR /&gt;if [ $status is "0 or 1" ] ; then &lt;BR /&gt;status="$status"; &lt;BR /&gt;else &lt;BR /&gt;status="$status"; &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;are shell-script-like.&lt;BR /&gt;&lt;BR /&gt;When you want this in awk it should be:&lt;BR /&gt;&lt;BR /&gt;if(status == "0" || status == "1)&lt;BR /&gt;status="" status ""; &lt;BR /&gt;else&lt;BR /&gt;status="" status ""; &lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 29 Aug 2002 13:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796766#M941025</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2002-08-29T13:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796767#M941026</link>
      <description>Oh sorry,&lt;BR /&gt;&lt;BR /&gt;i've missed a quote:&lt;BR /&gt;&lt;BR /&gt;if(status == "0" || status == "1") &lt;BR /&gt;</description>
      <pubDate>Thu, 29 Aug 2002 13:11:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796767#M941026</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2002-08-29T13:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796768#M941027</link>
      <description>Hi (again) Frank:&lt;BR /&gt;&lt;BR /&gt;Oops, I missed that fact that it was part of the 'awk'.  Therefore:&lt;BR /&gt;&lt;BR /&gt;# {if ($status==0 || $status==1) {...} else {...}}&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 29 Aug 2002 13:11:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796768#M941027</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-08-29T13:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796769#M941028</link>
      <description>Ok all&lt;BR /&gt;&lt;BR /&gt;Each of these suggestions has been very helpful, but I must be missing something since I am still getting this message:&lt;BR /&gt;&lt;BR /&gt;if ($status==0 || $status==1); &lt;BR /&gt;then&lt;BR /&gt;   status="$status";&lt;BR /&gt;else&lt;BR /&gt;   status="$status";&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;printf("%s%s%s%s%s%s%s%s%s%s\n",jobid,sta,&lt;BR /&gt;Kbytes,files,compestimated); &lt;BR /&gt;}' &amp;gt; ${TMP_FILE} &lt;BR /&gt; syntax error The source line is 20.&lt;BR /&gt; The error context is&lt;BR /&gt;                 &amp;gt;&amp;gt;&amp;gt; else &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt; awk: The statement cannot be correctly parsed.&lt;BR /&gt; The source line is 20.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does the ELSE statement have a problem the way it is or do I have to do a else; ? or am I looking in the wrong place.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Aug 2002 13:28:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796769#M941028</guid>
      <dc:creator>fg_1</dc:creator>
      <dc:date>2002-08-29T13:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796770#M941029</link>
      <description>Okay, I throughly confused. Is this shell or awk? I thought that your original if was shell that was calling some awk. If it is awk, then&lt;BR /&gt;drop the '$', it should be simply 'status' rather than '$status'. (I know you use $1,$2, ... but this is awk; you want consistancy?) &lt;BR /&gt;&lt;BR /&gt;also you need to watch semicolons;&lt;BR /&gt;&lt;BR /&gt;if (status == 0 || status == 1); &amp;lt;-- WRONG; no semicolon&lt;BR /&gt;&lt;BR /&gt;AND&lt;BR /&gt;&lt;BR /&gt;= is an assignment; == is a comparison&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Aug 2002 13:35:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796770#M941029</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-08-29T13:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: AWK Help Please.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796771#M941030</link>
      <description>Hi (again) Frank:&lt;BR /&gt;&lt;BR /&gt;Note again:&lt;BR /&gt;&lt;BR /&gt;{if ($status==0 || $status==1) {...} else {...}} &lt;BR /&gt;&lt;BR /&gt;There is no "then" word in 'awk'...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 29 Aug 2002 13:45:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help-please/m-p/2796771#M941030</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-08-29T13:45:49Z</dc:date>
    </item>
  </channel>
</rss>

