<br><br><div><span class="gmail_quote">On 2/20/08, <b class="gmail_sendername">Owen Townend</b> <<a href="mailto:owen.townend@gmail.com">owen.townend@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
<div><span class="e" id="q_11836cbedc9da467_0"><br><br><div><span class="gmail_quote">On 2/20/08, <b class="gmail_sendername">Germain Morbe</b> <<a href="mailto:germain.morbe@web.de" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">germain.morbe@web.de</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
 Hi all,<br><br>im looking for a solution to strip the file extension<br>within a bash script.<br><br>thanks<br><br>--<br>ubuntu-users mailing list<br><a href="mailto:ubuntu-users@lists.ubuntu.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ubuntu-users@lists.ubuntu.com</a><br>
 Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a></blockquote>
</div></span></div></blockquote><div><br><br></div><br><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
Hey,<br>  Look into `sed`. Something like this should do it<br>   `sed -e 's/.*$//'`<br><br>  That's from the top of my head though, check it first!<br><br>cheers,<br><span class="sg">Owen.<br></span></blockquote>
</div><br><div>ehem, sorry,<br>  just realised that wipes the whole line...<br>  Try `sed -e 's/.mp3$//'` for a single extension.<br>  `sed -e 's/.mp3$/.wma/'` to change it.<br>  `sed -e 's/....$//'`  to cut a three letter extension and the '.'<br>
  etc...<br><br>cheers,<br>Owen.<br></div><br><br>