<?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: Another Newbie Question 'For Syntax' in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373849#M713631</link>
    <description>Scott,&lt;BR /&gt;&lt;BR /&gt;  This may not be what you are looking for. But as far as I know, there is no loop construct like that in Posix.&lt;BR /&gt;&lt;BR /&gt;  FOR loop in posix will only accept list of values, not the range of values.&lt;BR /&gt;&lt;BR /&gt;  You can try something like this&lt;BR /&gt;  &lt;BR /&gt;  for I in 0 1 2 3 4 5 6 7 8 9&lt;BR /&gt;&lt;BR /&gt;  But clearly, it is not an elegant or effective way of scripting.&lt;BR /&gt;&lt;BR /&gt;-- Sundar.</description>
    <pubDate>Wed, 08 Sep 2004 12:21:04 GMT</pubDate>
    <dc:creator>Sundar_7</dc:creator>
    <dc:date>2004-09-08T12:21:04Z</dc:date>
    <item>
      <title>Another Newbie Question 'For Syntax'</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373845#M713627</link>
      <description>If I were writing this in C I would write:&lt;BR /&gt;For($i=0; $i&amp;lt;$total; $i+9) {&lt;BR /&gt;whatever I want to do&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Does Posix have a similar syntax to do this?  I've looked in the sh-posix man pages and haven't come up with this type of loop.  Can anyone help me again?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Scott</description>
      <pubDate>Tue, 07 Sep 2004 14:43:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373845#M713627</guid>
      <dc:creator>Scott Frye_1</dc:creator>
      <dc:date>2004-09-07T14:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Another Newbie Question 'For Syntax'</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373846#M713628</link>
      <description>You will have to try something like this with while&lt;BR /&gt;&lt;BR /&gt;typeset -i COUNT=0&lt;BR /&gt;MAX=10&lt;BR /&gt;&lt;BR /&gt;while [[ $COUNT -lt $MAX ]]&lt;BR /&gt;do&lt;BR /&gt;  &lt;WHATEVER-U-WANT-TO-DO&gt;&lt;BR /&gt;  (( COUNT=COUNT+1 ))&lt;BR /&gt;done&lt;BR /&gt;&lt;/WHATEVER-U-WANT-TO-DO&gt;</description>
      <pubDate>Tue, 07 Sep 2004 14:46:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373846#M713628</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-07T14:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Another Newbie Question 'For Syntax'</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373847#M713629</link>
      <description>Wasn't what I was looking for but it worked like a charm.  Thank you for your input.</description>
      <pubDate>Wed, 08 Sep 2004 08:39:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373847#M713629</guid>
      <dc:creator>Scott Frye_1</dc:creator>
      <dc:date>2004-09-08T08:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Another Newbie Question 'For Syntax'</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373848#M713630</link>
      <description>You can use until format for this too as,&lt;BR /&gt;&lt;BR /&gt;i=0&lt;BR /&gt;total=10&lt;BR /&gt;&lt;BR /&gt;until [[ $i -gt $total ]]&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt; echo $i&lt;BR /&gt; &lt;WHAT ever="" you="" want="" to="" do=""&gt;&lt;BR /&gt;&lt;BR /&gt; # loop increment&lt;BR /&gt; let i=i+1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;/WHAT&gt;</description>
      <pubDate>Wed, 08 Sep 2004 12:05:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373848#M713630</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-08T12:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Another Newbie Question 'For Syntax'</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373849#M713631</link>
      <description>Scott,&lt;BR /&gt;&lt;BR /&gt;  This may not be what you are looking for. But as far as I know, there is no loop construct like that in Posix.&lt;BR /&gt;&lt;BR /&gt;  FOR loop in posix will only accept list of values, not the range of values.&lt;BR /&gt;&lt;BR /&gt;  You can try something like this&lt;BR /&gt;  &lt;BR /&gt;  for I in 0 1 2 3 4 5 6 7 8 9&lt;BR /&gt;&lt;BR /&gt;  But clearly, it is not an elegant or effective way of scripting.&lt;BR /&gt;&lt;BR /&gt;-- Sundar.</description>
      <pubDate>Wed, 08 Sep 2004 12:21:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373849#M713631</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-08T12:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Another Newbie Question 'For Syntax'</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373850#M713632</link>
      <description>We can use awk programming to use exact format of c as,&lt;BR /&gt;&lt;BR /&gt;i=0&lt;BR /&gt;total=10&lt;BR /&gt;&lt;BR /&gt;echo "$i $total" | awk '{ for ( i=$1; i&amp;lt;=$2; i++) &lt;AWK related=""&gt; }'&lt;BR /&gt;&lt;BR /&gt;- Muthu&lt;/AWK&gt;</description>
      <pubDate>Wed, 08 Sep 2004 23:57:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-newbie-question-for-syntax/m-p/3373850#M713632</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-08T23:57:24Z</dc:date>
    </item>
  </channel>
</rss>

