title: Get substring of a string in korn shell
body: <p>I have to extract a substring using ksh88. (BTW the simple way of finding the version of ksh <code>$KSH_VERSION</code> is not working for me. I had to use</p>
  
  <pre><code> [ "`echo "\c" | grep c`" ] &amp;&amp; echo ksh93 || echo ksh88
  </code></pre>
  
  <p>I tried using the command <code>echo ${stringvariable : 2: 2}</code> But it says <code>bad substitution</code>. I am new to the Unix world. This is what I did to get the result:</p>
  
  <p>I've logged into Unix using PUTTY and typed the above command. I also tried first ksh command, then my command but still no success. Is there anything I am doing wrong?</p>
  
  <p>Also if I want the substring till end starting from position 2 how to do that?</p>