<?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: for loop help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090773#M93320</link>
    <description>&amp;gt;JRF: # awk '/oldgemp0[1][6-9]|[2][0-9]|30/'&lt;BR /&gt;&lt;BR /&gt;I don't think the operator precedence is correct for your ERE.  You need:&lt;BR /&gt;$ awk '/oldgemp0([1][6-9]|[2][0-9]|30)/'&lt;BR /&gt;&lt;BR /&gt;Your first one finds "new20".</description>
    <pubDate>Wed, 06 Feb 2008 07:01:43 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-02-06T07:01:43Z</dc:date>
    <item>
      <title>for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090766#M93313</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to manipulate some data ie:&lt;BR /&gt;&lt;BR /&gt;oldgemp016 to oldgemp030&lt;BR /&gt;&lt;BR /&gt;I need to make these not mountable on system reboot (AIX) and the command line is&lt;BR /&gt;&lt;BR /&gt;chfs -A n oldgemp&lt;NN&gt;&lt;BR /&gt;&lt;BR /&gt;how would I sort the regular expression in a for loop??&lt;BR /&gt;&lt;BR /&gt;I am kinda thinking I should &lt;BR /&gt;&lt;BR /&gt;for a in `echo oldgemp0[1-3][0-9]`&lt;BR /&gt;&lt;BR /&gt;however this will error on gemp010 11 12 etc becuase they dont exist.&lt;BR /&gt;&lt;BR /&gt;how could this be resolved?&lt;BR /&gt;&lt;BR /&gt;any help is greatly appreciated as always.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Chris.&lt;/NN&gt;</description>
      <pubDate>Fri, 01 Feb 2008 16:37:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090766#M93313</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-02-01T16:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090767#M93314</link>
      <description>&lt;!--!*#--&gt;There are many possibilities.&lt;BR /&gt;Will this one do?&lt;BR /&gt;&lt;BR /&gt;$  i=15;while (($((i+=1))&amp;lt;=30));do echo oldgemp0$i;done&lt;BR /&gt;oldgemp016&lt;BR /&gt;oldgemp017&lt;BR /&gt;oldgemp018&lt;BR /&gt;oldgemp019&lt;BR /&gt;oldgemp020&lt;BR /&gt;oldgemp021&lt;BR /&gt;oldgemp022&lt;BR /&gt;oldgemp023&lt;BR /&gt;oldgemp024&lt;BR /&gt;oldgemp025&lt;BR /&gt;oldgemp026&lt;BR /&gt;oldgemp027&lt;BR /&gt;oldgemp028&lt;BR /&gt;oldgemp029&lt;BR /&gt;oldgemp030&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Feb 2008 17:06:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090767#M93314</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2008-02-01T17:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090768#M93315</link>
      <description>thats great&lt;BR /&gt;&lt;BR /&gt;many thanks&lt;BR /&gt;&lt;BR /&gt;chris</description>
      <pubDate>Fri, 01 Feb 2008 17:20:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090768#M93315</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-02-01T17:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090769#M93316</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think there is a 'lsfs' on AIX, and I'm shure it was enough options to restrict its output to  a parsable form.&lt;BR /&gt;Then something like&lt;BR /&gt;for in in `lsfs &lt;LSOF-OPTIONS and=""&gt;`&lt;BR /&gt;do&lt;BR /&gt; ...&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;for in in `lsfs &lt;LSOF-OPTIONS and=""&gt; | grep oldgemp0[1-3][0-9]`&lt;BR /&gt;do&lt;BR /&gt; ...&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;will present you only existing volumes.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;/LSOF-OPTIONS&gt;&lt;/LSOF-OPTIONS&gt;</description>
      <pubDate>Fri, 01 Feb 2008 17:33:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090769#M93316</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-02-01T17:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090770#M93317</link>
      <description>here is an example using the lsfs command&lt;BR /&gt;&lt;BR /&gt;thanks Peter for the prompt&lt;BR /&gt;&lt;BR /&gt;for FS in `lsfs -c |awk -F':' '/oldgemp/ {print $1}' |sed 's/\/app\///'`&lt;BR /&gt;do&lt;BR /&gt;etc etc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;again another example however if I was looking for regular expression to find all values for oldgemp016 to oldgemp030&lt;BR /&gt;&lt;BR /&gt;what would be the best systax?&lt;BR /&gt;&lt;BR /&gt;thanks &lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Fri, 01 Feb 2008 17:51:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090770#M93317</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-02-01T17:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090771#M93318</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; if I was looking for regular expression to find all values for oldgemp016 to oldgemp030&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You could use:&lt;BR /&gt;&lt;BR /&gt;# awk '/oldgemp0[1][6-9]|[2][0-9]|30/'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 01 Feb 2008 18:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090771#M93318</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-02-01T18:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090772#M93319</link>
      <description>ok good - thanks all</description>
      <pubDate>Mon, 04 Feb 2008 10:54:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090772#M93319</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-02-04T10:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090773#M93320</link>
      <description>&amp;gt;JRF: # awk '/oldgemp0[1][6-9]|[2][0-9]|30/'&lt;BR /&gt;&lt;BR /&gt;I don't think the operator precedence is correct for your ERE.  You need:&lt;BR /&gt;$ awk '/oldgemp0([1][6-9]|[2][0-9]|30)/'&lt;BR /&gt;&lt;BR /&gt;Your first one finds "new20".</description>
      <pubDate>Wed, 06 Feb 2008 07:01:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090773#M93320</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-02-06T07:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: for loop help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090774#M93321</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Dennis: JRF I don't think the operator precedence is correct for your ERE&lt;BR /&gt;&lt;BR /&gt;Good catch, thanks.  You are correct, of course.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 06 Feb 2008 12:49:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-help/m-p/5090774#M93321</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-02-06T12:49:42Z</dc:date>
    </item>
  </channel>
</rss>

