title: What's the unix command to copy specific lines from one file to another file?
body: <p>I searched the web for hours, please excuse me if I overlooked something. I'm a beginner.<br> I want to copy lines that include a certain string from file1 to file2. These lines from file 1 have to be inserted in file2, but only in specific lines that include another string.</p>
  
  <p>(It's about the entire lines with the timecode)</p>
  
  <p>Content of file1:</p>
  
  <pre>
  1
  00:00:16,520 --> 00:00:23,200
  Some text
  
  2
  00:00:25,800 --> 00:00:32,600
  Some more text
  </pre>
  
  <p>Content of file2:</p>
  
  <pre>
  1
  00: 00: 16,520 -> 00: 00: 23,200
  Different text
  
  2
  00: 00: 25,720 -> 00: 00: 32,520
  More different text
  </pre>
  
  <p><br>
  <pre>awk '/ --> /' file1</pre><br> lists the lines I need from file1. But what do I have to add to the code to take these awk results and copy them only into the lines of file2 that include <pre>'/ -> /'</pre>??<br><br>
  Thanks a lot for your support!!!<br><br></p>
  
  <p>Result in file2 should be:</p>
  
  <pre>
  1
  00:00:16,520 --> 00:00:23,200
  Different text
  
  2
  00:00:25,800 --> 00:00:32,600
  More different text
  </pre>