title: Get exact position of string in a file- UNIX command line
body: <p>I'm looking for some strings in a file and I need their exact position (line number and position in the line) using UNIX commands.</p>
  
  <p>I'm only able to find line numbers using <strong><em>grep -n</em></strong>, but I can't get number of appearance or even their positions.</p>
  
  <p>I know how to write a script in R using <strong><em>gregexpr</em></strong> function to do all this, but I would like to use only UNIX commands. Is there some equivalent for it?</p>