OT: Shell script

Gerhard Meier gemei2 at web.de
Mon Jul 11 19:18:22 GMT 2005

On Mon, Jul 11, 2005 at 01:36:31PM -0500, Brian Henning wrote:
> I want it to be able to get a filename without the extention on the end.
> [...]
> file.mp3
> i would like it to return 'file'.

Well, I like the following solution, because it doesn't fork:

echo ${FILE%.*}


More information about the freebsd-questions mailing list