Get parts of string after a certain word? Shell <p>I have the following variable that contains a string displaying folders in a dir tree:</p> <pre><code>root/f1/f2/f3/f4/f5 root/f1/f2/f3/f4 root/f1/f2/f3 </code></pre> <p>How would I go about removing everything that is before f2 so what I'm left with will be:</p> <pre><code>f2/f3/f4/f5 f2/f3/f4 f2/f3 </code></pre> <p>?</p>