title: how to modify a text file in ruby
body: <p>I have a file named ama.txt and the content of the file is like this:</p>
  
  <pre><code>name      age   hobby       sex
  
  amit      45    music       male
  
  sumit     35    cricket     female
  </code></pre>
  
  <p>Now I can open the file like this:</p>
  
  <pre><code>File.open("ama.txt").each do
  
  end
  </code></pre>
  
  <p>How can I modify the <code>hobby</code> column of the file?   </p>