Date: Mon, 11 Jul 2005 21:18:18 +0200 From: Gerhard Meier <gemei2@web.de> To: freebsd-questions@freebsd.org Subject: Re: OT: Shell script Message-ID: <20050711191818.GA37039@duplo.dahoam> In-Reply-To: <1f75ab0e050711113657ba7057@mail.gmail.com> References: <1f75ab0e050711113657ba7057@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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:
FILE=file.mp3
echo ${FILE%.*}
bye,
Gerhard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050711191818.GA37039>
