title: Shell script substring from first indexof substring
body: <p>I want to accomplish the equivalent of the following pseudo-code in bash (both a and b are inputs to my script) :</p>
  
  <pre><code>String a = "some long string";
  String b = "ri";
  print (a.substring(a.firstIndexOf(b), a.length()); //prints 'ring'
  </code></pre>
  
  <p>How can I do this in shell script?</p>