title: Decrease string length in pattern
body: <p>I have a string like so:</p>
  
  <pre><code>text1;text2;text3;text4;text5;text6 
  </code></pre>
  
  <p>and i need to decrease length of string after 3rd occurrence ; so in that case</p>
  
  <pre><code>text
  </code></pre>
  
  <p>, to for example 4 characters.</p>
  
  <p>so far i did:</p>
  
  <pre><code>echo "$(cat pp.txt | awk -F ";" '{print $4}' | sed 's/^\(...\).*/\1/;q' )"
  </code></pre>
  
  <p>But the output is "text". What i need is:</p>
  
  <p><code>Text1;text2;text3;text;text5;text6</code></p>
  
  <p>Please help</p>