title: Using Bash Script to Find Line Number of String in File
body: <p>How can I use a bash script to find the line number where a string occurs?</p>
  
  <p>For example if a file looked like this,</p>
  
  <pre><code>Hello I am Isaiah
  This is a line of text.
  This is another line of text.
  </code></pre>
  
  <p>and I ran the script to look for the string "line" it would output the number 2, as it is the first occurance.</p>