title: stop writting in a text file in standard LUA
body: <p>I want to stop writting in a text file.
  my text file has 4 lines and I'm reading file, line by line, so I've got:</p>
  
  <blockquote>
    <p>apple orange banana cocoa apple orange banana cocoa apple orange
    banana cocoa, and so on till I leave from the app.</p>
  </blockquote>
  
  <p>I just want output like:</p>
  
  <blockquote>
    <p>apple 
    orange 
    banana 
    cocoa</p>
  </blockquote>
  
  <p>And stop, how I can get it?</p>
  
  <p>I've tried a lot of different code, with not to avail.
  I ignore how many lines the file has, even how many files are, since not all users has a file, ignore how many users has file, this is random, so I should to find out how many users have files, open each one's file, and check some data that I need, and that I can't publish here.
  I has this solved, problem is the huge file I'm getting.</p>
  
  <pre><code>while i &lt;= #g do 
     i = i + 1
     fho:write(zline)
     fho:write("\n")      
     break    
  end
  </code></pre>
  
  <p>I entered all the users with files in an array, and used the size of the array as an iterator in a loop, without any positive results.
  I expect to stop writting when end file being reached.</p>