title: Find line number in a text file - without opening the file
body: <p>In a very large file I need to find the position (line number) of a string, then extract the 2 lines above and below that string. </p>
  
  <p>To do this right now - I launch vi, find the string, note it's line number, exit vi, then use sed to extract the lines surrounding that string. </p>
  
  <p>Is there a way to streamline this process... ideally without having to run vi at all.</p>