Skip site navigation (1)Skip section navigation (2)
Date:      11 Jul 2005 15:07:12 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Brian Henning <brian.henning@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: OT: Shell script
Message-ID:  <44irzhp3fj.fsf@be-well.ilk.org>
In-Reply-To: <1f75ab0e050711113657ba7057@mail.gmail.com>
References:  <1f75ab0e050711113657ba7057@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Henning <brian.henning@gmail.com> writes:

> I am trying to write an SH script that i need some functionality. 
> 
> I want it to be able to get a filename without the extention on the end.
> 
> for example.
> 
> file.mp3
> 
> i would like it to return 'file'.

basename(1); it's even POSIX, so it's pretty portable.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44irzhp3fj.fsf>