<?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 For loop issue in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081187#M92534</link>
    <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I´m newby in shell scripting and i have not idea about how the for loop works. I need:&lt;BR /&gt;&lt;BR /&gt;touch /tmp/file 1&lt;BR /&gt;touch /tmp/file 2&lt;BR /&gt;                .&lt;BR /&gt;                .&lt;BR /&gt;touch /tmp/file n&lt;BR /&gt;&lt;BR /&gt;Any help wiil be helpfull.&lt;BR /&gt;&lt;BR /&gt;Tks and Rgds!</description>
    <pubDate>Fri, 23 Nov 2007 13:05:16 GMT</pubDate>
    <dc:creator>Andres_13</dc:creator>
    <dc:date>2007-11-23T13:05:16Z</dc:date>
    <item>
      <title>For loop issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081187#M92534</link>
      <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I´m newby in shell scripting and i have not idea about how the for loop works. I need:&lt;BR /&gt;&lt;BR /&gt;touch /tmp/file 1&lt;BR /&gt;touch /tmp/file 2&lt;BR /&gt;                .&lt;BR /&gt;                .&lt;BR /&gt;touch /tmp/file n&lt;BR /&gt;&lt;BR /&gt;Any help wiil be helpfull.&lt;BR /&gt;&lt;BR /&gt;Tks and Rgds!</description>
      <pubDate>Fri, 23 Nov 2007 13:05:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081187#M92534</guid>
      <dc:creator>Andres_13</dc:creator>
      <dc:date>2007-11-23T13:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: For loop issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081188#M92535</link>
      <description>for i in 1 2 3 4 5&lt;BR /&gt;do touch /tmp/file$i&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:10:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081188#M92535</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2007-11-23T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: For loop issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081189#M92536</link>
      <description>Thanks for your quick response Christian, but i need something more 'automatic' (something that donÂ´t need to type the number of "i" ocurrences, because the number of files that i qill need to create is in the order of thousands).&lt;BR /&gt;&lt;BR /&gt;Apreciate your help!</description>
      <pubDate>Fri, 23 Nov 2007 13:18:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081189#M92536</guid>
      <dc:creator>Andres_13</dc:creator>
      <dc:date>2007-11-23T13:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: For loop issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081190#M92537</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;modify the variable base and max to your needs!&lt;BR /&gt;&lt;BR /&gt;typeset -i i=0 max=1000&lt;BR /&gt;base=/tmp/file&lt;BR /&gt;while [ $((i+=1)) -le max ]&lt;BR /&gt;do print $base$i&lt;BR /&gt;done | xargs touch&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;BR /&gt;PS: posix/ksh-Shell!</description>
      <pubDate>Fri, 23 Nov 2007 13:26:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081190#M92537</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-11-23T13:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: For loop issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081191#M92538</link>
      <description>Thanks Peter that´s what i´m looking for!!!&lt;BR /&gt;&lt;BR /&gt;Regards!</description>
      <pubDate>Fri, 23 Nov 2007 13:39:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081191#M92538</guid>
      <dc:creator>Andres_13</dc:creator>
      <dc:date>2007-11-23T13:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: For loop issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081192#M92539</link>
      <description>&amp;gt;but i need something more 'automatic' (something that doesn't need to type the number of "i" occurrences ...)&lt;BR /&gt;&lt;BR /&gt;If you want to do something where the files already exist:&lt;BR /&gt;for file in $(ls file*); do&lt;BR /&gt;&lt;BR /&gt;If you want to do something where the list of things is in a file:&lt;BR /&gt;for file in $(&amp;lt; filelist); do</description>
      <pubDate>Sat, 24 Nov 2007 01:30:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/for-loop-issue/m-p/5081192#M92539</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-24T01:30:32Z</dc:date>
    </item>
  </channel>
</rss>

