title: copy lines containing word from one file to another file in linux
body: <p>I want to copy lines containing certain words from <code>file1</code> to <code>file2</code>.</p>
  
  <p>Suppose <code>file1</code>:</p>
  
  <pre><code>ram 100 ct 50
  gopal 200 bc 40
  ravi 50 ct 40
  krishna 200 ct 100
  </code></pre>
  
  <p><code>file2</code> should have only the lines containing "ct", which would look like this:</p>
  
  <pre><code>ram 100 ct 50
  ravi 50 ct 40
  krishna 200 ct 100
  </code></pre>
  
  <p>Which is the best way to achieve this? I had a file of 200mb.
  I used <code>grep</code> but I didn't get any result running <code>grep -n ct file1</code>.</p>